mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
refactor conf
This commit is contained in:
@@ -39,12 +39,12 @@ func isSupported(protocol string, protocols []string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *Selector) AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error {
|
||||
func (s *Selector) AddNode(tag string, info *panel.NodeInfo, option *conf.Options) error {
|
||||
for i := range s.cores {
|
||||
if !isSupported(info.Type, s.cores[i].Protocols()) {
|
||||
if option.Core != s.cores[i].Type() {
|
||||
continue
|
||||
}
|
||||
err := s.cores[i].AddNode(tag, info, config)
|
||||
err := s.cores[i].AddNode(tag, info, option)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -97,3 +97,7 @@ func (s *Selector) Protocols() []string {
|
||||
}
|
||||
return protocols
|
||||
}
|
||||
|
||||
func (s *Selector) Type() string {
|
||||
return "selector"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user