mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-20 06:58:38 +03:00
Refactor: GeoSite & GeoIP
This commit is contained in:
25
common/matcher/geoip/geoip.proto
Normal file
25
common/matcher/geoip/geoip.proto
Normal file
@ -0,0 +1,25 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package xray.common.matcher.geoip;
|
||||
option csharp_namespace = "Xray.Common.Matcher.GeoIP";
|
||||
option go_package = "github.com/xtls/xray-core/common/matcher/geoip";
|
||||
option java_package = "com.xray.common.matcher.geoip";
|
||||
option java_multiple_files = true;
|
||||
|
||||
// IP for routing decision, in CIDR form.
|
||||
message CIDR {
|
||||
// IP address, should be either 4 or 16 bytes.
|
||||
bytes ip = 1;
|
||||
|
||||
// Number of leading ones in the network mask.
|
||||
uint32 prefix = 2;
|
||||
}
|
||||
|
||||
message GeoIP {
|
||||
string country_code = 1;
|
||||
repeated CIDR cidr = 2;
|
||||
}
|
||||
|
||||
message GeoIPList {
|
||||
repeated GeoIP entry = 1;
|
||||
}
|
Reference in New Issue
Block a user