mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-23 17:11:28 +00:00
Fix: config loader
This commit is contained in:
parent
5d5beb2028
commit
1c3abb2ec3
|
@ -100,6 +100,11 @@ func ParaseIPList(ips []string) ([]*GeoIP, error) {
|
||||||
if strings.HasPrefix(ip, "geoip:") {
|
if strings.HasPrefix(ip, "geoip:") {
|
||||||
country := ip[6:]
|
country := ip[6:]
|
||||||
isReverseMatch := false
|
isReverseMatch := false
|
||||||
|
if strings.HasPrefix(country, "!") {
|
||||||
|
country = country[1:]
|
||||||
|
isReverseMatch = true
|
||||||
|
}
|
||||||
|
|
||||||
geoipc, err := LoadGeoIP(strings.ToUpper(country))
|
geoipc, err := LoadGeoIP(strings.ToUpper(country))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, newError("failed to load GeoIP: ", country).Base(err)
|
return nil, newError("failed to load GeoIP: ", country).Base(err)
|
||||||
|
|
Loading…
Reference in a new issue