mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 18:08:14 -05:00
fix core selector
This commit is contained in:
parent
e28a7e00b9
commit
cacc16463a
@ -43,13 +43,14 @@ func isSupported(protocol string, protocols []string) bool {
|
|||||||
func (s *Selector) AddNode(tag string, info *panel.NodeInfo, option *conf.Options) error {
|
func (s *Selector) AddNode(tag string, info *panel.NodeInfo, option *conf.Options) error {
|
||||||
for i, c := range s.cores {
|
for i, c := range s.cores {
|
||||||
if len(option.Core) == 0 {
|
if len(option.Core) == 0 {
|
||||||
if isSupported(info.Type, c.Protocols()) {
|
if !isSupported(info.Type, c.Protocols()) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
option.Core = c.Type()
|
option.Core = c.Type()
|
||||||
err := option.UnmarshalJSON(option.RawOptions)
|
err := option.UnmarshalJSON(option.RawOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unmarshal option error: %s", err)
|
return fmt.Errorf("unmarshal option error: %s", err)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else if option.Core != c.Type() {
|
} else if option.Core != c.Type() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user