github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/app/router/routercommon/common.proto (about) 1 syntax = "proto3"; 2 3 package v2ray.core.app.router.routercommon; 4 option csharp_namespace = "V2Ray.Core.App.Router.Routercommon"; 5 option go_package = "github.com/v2fly/v2ray-core/v5/app/router/routercommon"; 6 option java_package = "com.v2ray.core.app.router.routercommon"; 7 option java_multiple_files = true; 8 9 10 import "common/protoext/extensions.proto"; 11 12 // Domain for routing decision. 13 message Domain { 14 // Type of domain value. 15 enum Type { 16 // The value is used as is. 17 Plain = 0; 18 // The value is used as a regular expression. 19 Regex = 1; 20 // The value is a root domain. 21 RootDomain = 2; 22 // The value is a domain. 23 Full = 3; 24 } 25 26 // Domain matching type. 27 Type type = 1; 28 29 // Domain value. 30 string value = 2; 31 32 message Attribute { 33 string key = 1; 34 35 oneof typed_value { 36 bool bool_value = 2; 37 int64 int_value = 3; 38 } 39 } 40 41 // Attributes of this domain. May be used for filtering. 42 repeated Attribute attribute = 3; 43 } 44 45 // IP for routing decision, in CIDR form. 46 message CIDR { 47 // IP address, should be either 4 or 16 bytes. 48 bytes ip = 1; 49 50 // Number of leading ones in the network mask. 51 uint32 prefix = 2; 52 53 string ip_addr = 68000 [(v2ray.core.common.protoext.field_opt).convert_time_parse_ip = "ip"]; 54 } 55 56 message GeoIP { 57 string country_code = 1; 58 repeated CIDR cidr = 2; 59 bool inverse_match = 3; 60 61 // resource_hash instruct simplified config converter to load domain from geo file. 62 bytes resource_hash = 4; 63 string code = 5; 64 65 string file_path = 68000[(v2ray.core.common.protoext.field_opt).convert_time_resource_loading = "resource_hash"]; 66 } 67 68 message GeoIPList { 69 repeated GeoIP entry = 1; 70 } 71 72 message GeoSite { 73 string country_code = 1; 74 repeated Domain domain = 2; 75 76 // resource_hash instruct simplified config converter to load domain from geo file. 77 bytes resource_hash = 3; 78 string code = 4; 79 80 string file_path = 68000[(v2ray.core.common.protoext.field_opt).convert_time_resource_loading = "resource_hash"]; 81 } 82 83 message GeoSiteList { 84 repeated GeoSite entry = 1; 85 }