[Fix] url-test npe
This commit is contained in:
parent
7a54d616c4
commit
79d984ee8e
1 changed files with 0 additions and 14 deletions
|
@ -196,7 +196,6 @@ type RawConfig struct {
|
||||||
RoutingMark int `yaml:"routing-mark"`
|
RoutingMark int `yaml:"routing-mark"`
|
||||||
GeodataMode bool `yaml:"geodata-mode"`
|
GeodataMode bool `yaml:"geodata-mode"`
|
||||||
GeodataLoader string `yaml:"geodata-loader"`
|
GeodataLoader string `yaml:"geodata-loader"`
|
||||||
AutoIptables bool `yaml:"auto-iptables"`
|
|
||||||
|
|
||||||
ProxyProvider map[string]map[string]any `yaml:"proxy-providers"`
|
ProxyProvider map[string]map[string]any `yaml:"proxy-providers"`
|
||||||
RuleProvider map[string]map[string]any `yaml:"rule-providers"`
|
RuleProvider map[string]map[string]any `yaml:"rule-providers"`
|
||||||
|
@ -230,7 +229,6 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
|
||||||
Mode: T.Rule,
|
Mode: T.Rule,
|
||||||
GeodataMode: C.GeodataMode,
|
GeodataMode: C.GeodataMode,
|
||||||
GeodataLoader: "memconservative",
|
GeodataLoader: "memconservative",
|
||||||
AutoIptables: false,
|
|
||||||
UnifiedDelay: false,
|
UnifiedDelay: false,
|
||||||
Authentication: []string{},
|
Authentication: []string{},
|
||||||
LogLevel: log.INFO,
|
LogLevel: log.INFO,
|
||||||
|
@ -466,18 +464,6 @@ func parseProxies(cfg *RawConfig) (proxies map[string]C.Proxy, providersMap map[
|
||||||
proxies[groupName] = adapter.NewProxy(group)
|
proxies[groupName] = adapter.NewProxy(group)
|
||||||
}
|
}
|
||||||
|
|
||||||
// initial compatible provider
|
|
||||||
for _, pd := range providersMap {
|
|
||||||
if pd.VehicleType() != providerTypes.Compatible {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Infoln("Start initial compatible provider %s", pd.Name())
|
|
||||||
if err := pd.Initial(); err != nil {
|
|
||||||
return nil, nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var ps []C.Proxy
|
var ps []C.Proxy
|
||||||
for _, v := range proxyList {
|
for _, v := range proxyList {
|
||||||
ps = append(ps, proxies[v])
|
ps = append(ps, proxies[v])
|
||||||
|
|
Loading…
Reference in a new issue