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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user