add selector
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
tls_util "github.com/go-gost/x/internal/util/tls"
|
||||
"github.com/go-gost/x/metadata"
|
||||
"github.com/go-gost/x/registry"
|
||||
xs "github.com/go-gost/x/selector"
|
||||
)
|
||||
|
||||
func ParseChain(cfg *config.ChainConfig) (chain.SelectableChainer, error) {
|
||||
@ -140,6 +141,9 @@ func ParseChain(cfg *config.ChainConfig) (chain.SelectableChainer, error) {
|
||||
if s := parseNodeSelector(hop.Selector); s != nil {
|
||||
sel = s
|
||||
}
|
||||
if sel == nil {
|
||||
sel = xs.DefaultNodeSelector
|
||||
}
|
||||
group.WithSelector(sel).
|
||||
WithBypass(bypass.BypassGroup(bypassList(hop.Bypass, hop.Bypasses...)...))
|
||||
|
||||
|
Reference in New Issue
Block a user