mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Select alive only node when fallbackTag is given
- Apply to random and roundrobin strategy - Require observatory config Co-authored-by: Mark Ma <38940419+mkmark@users.noreply.github.com>
This commit is contained in:
parent
eba2906d3a
commit
84eeb56ae4
4 changed files with 100 additions and 5 deletions
|
@ -135,7 +135,7 @@ func (br *BalancingRule) Build(ohm outbound.Manager, dispatcher routing.Dispatch
|
|||
case "roundrobin":
|
||||
return &Balancer{
|
||||
selectors: br.OutboundSelector,
|
||||
strategy: &RoundRobinStrategy{},
|
||||
strategy: &RoundRobinStrategy{FallbackTag: br.FallbackTag},
|
||||
fallbackTag: br.FallbackTag,
|
||||
ohm: ohm,
|
||||
}, nil
|
||||
|
@ -162,7 +162,7 @@ func (br *BalancingRule) Build(ohm outbound.Manager, dispatcher routing.Dispatch
|
|||
selectors: br.OutboundSelector,
|
||||
ohm: ohm,
|
||||
fallbackTag: br.FallbackTag,
|
||||
strategy: &RandomStrategy{},
|
||||
strategy: &RandomStrategy{FallbackTag: br.FallbackTag},
|
||||
}, nil
|
||||
default:
|
||||
return nil, newError("unrecognized balancer type")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue