[Fix] url-test npe

This commit is contained in:
Adlyq 2022-03-23 13:29:11 +08:00
parent 7a54d616c4
commit 79d984ee8e

View File

@ -196,7 +196,6 @@ type RawConfig struct {
RoutingMark int `yaml:"routing-mark"`
GeodataMode bool `yaml:"geodata-mode"`
GeodataLoader string `yaml:"geodata-loader"`
AutoIptables bool `yaml:"auto-iptables"`
ProxyProvider map[string]map[string]any `yaml:"proxy-providers"`
RuleProvider map[string]map[string]any `yaml:"rule-providers"`
@ -230,7 +229,6 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
Mode: T.Rule,
GeodataMode: C.GeodataMode,
GeodataLoader: "memconservative",
AutoIptables: false,
UnifiedDelay: false,
Authentication: []string{},
LogLevel: log.INFO,
@ -466,18 +464,6 @@ func parseProxies(cfg *RawConfig) (proxies map[string]C.Proxy, providersMap map[
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
for _, v := range proxyList {
ps = append(ps, proxies[v])