1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-16 18:49:16 -04:00

rename reverse match to inverse match

This commit is contained in:
Shelikhoo
2021-09-06 15:37:47 +01:00
parent 31f3edd481
commit 6246b97494
4 changed files with 16 additions and 16 deletions

View File

@@ -135,7 +135,7 @@ func toCidrList(ctx context.Context, ips cfgcommon.StringList) ([]*router.GeoIP,
geoipList = append(geoipList, &router.GeoIP{
CountryCode: strings.ToUpper(country),
Cidr: geoip,
ReverseMatch: isReverseMatch,
InverseMatch: isReverseMatch,
})
continue
@@ -165,10 +165,10 @@ func toCidrList(ctx context.Context, ips cfgcommon.StringList) ([]*router.GeoIP,
return nil, newError("empty filename or empty country in rule")
}
isReverseMatch := false
isInverseMatch := false
if strings.HasPrefix(country, "!") {
country = country[1:]
isReverseMatch = true
isInverseMatch = true
}
geoip, err := geoLoader.LoadIP(filename, country)
if err != nil {
@@ -178,7 +178,7 @@ func toCidrList(ctx context.Context, ips cfgcommon.StringList) ([]*router.GeoIP,
geoipList = append(geoipList, &router.GeoIP{
CountryCode: strings.ToUpper(filename + "_" + country),
Cidr: geoip,
ReverseMatch: isReverseMatch,
InverseMatch: isInverseMatch,
})
continue