mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-08-22 02:08:44 +00:00
Fix: parse proxies shadow variable
This commit is contained in:
parent
754df5ba9b
commit
53b5ef199f
1 changed files with 4 additions and 3 deletions
|
@ -251,6 +251,7 @@ func parseProxies(cfg *rawConfig) (map[string]C.Proxy, error) {
|
||||||
return nil, fmt.Errorf("ProxyGroup %s: the duplicate name", groupName)
|
return nil, fmt.Errorf("ProxyGroup %s: the duplicate name", groupName)
|
||||||
}
|
}
|
||||||
var group C.Proxy
|
var group C.Proxy
|
||||||
|
var ps []C.Proxy
|
||||||
var err error
|
var err error
|
||||||
switch groupType {
|
switch groupType {
|
||||||
case "url-test":
|
case "url-test":
|
||||||
|
@ -260,7 +261,7 @@ func parseProxies(cfg *rawConfig) (map[string]C.Proxy, error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
ps, err := getProxies(proxies, urlTestOption.Proxies)
|
ps, err = getProxies(proxies, urlTestOption.Proxies)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("ProxyGroup %s: %s", groupName, err.Error())
|
return nil, fmt.Errorf("ProxyGroup %s: %s", groupName, err.Error())
|
||||||
}
|
}
|
||||||
|
@ -272,7 +273,7 @@ func parseProxies(cfg *rawConfig) (map[string]C.Proxy, error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
ps, err := getProxies(proxies, selectorOption.Proxies)
|
ps, err = getProxies(proxies, selectorOption.Proxies)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("ProxyGroup %s: %s", groupName, err.Error())
|
return nil, fmt.Errorf("ProxyGroup %s: %s", groupName, err.Error())
|
||||||
}
|
}
|
||||||
|
@ -284,7 +285,7 @@ func parseProxies(cfg *rawConfig) (map[string]C.Proxy, error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
ps, err := getProxies(proxies, fallbackOption.Proxies)
|
ps, err = getProxies(proxies, fallbackOption.Proxies)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("ProxyGroup %s: %s", groupName, err.Error())
|
return nil, fmt.Errorf("ProxyGroup %s: %s", groupName, err.Error())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue