github.com/kelleygo/clashcore@v1.0.2/component/geodata/router/config.proto (about) 1 syntax = "proto3"; 2 3 package yiclashcore.component.geodata.router; 4 option csharp_namespace = "YiClashCore.Component.Geodata.Router"; 5 option go_package = "github.com/kelleygo/clashcore/component/geodata/router"; 6 option java_package = "com.yiclashcore.component.geodata.router"; 7 option java_multiple_files = true; 8 9 // Domain for routing decision. 10 message Domain { 11 // Type of domain value. 12 enum Type { 13 // The value is used as is. 14 Plain = 0; 15 // The value is used as a regular expression. 16 Regex = 1; 17 // The value is a root domain. 18 Domain = 2; 19 // The value is a domain. 20 Full = 3; 21 } 22 23 // Domain matching type. 24 Type type = 1; 25 26 // Domain value. 27 string value = 2; 28 29 message Attribute { 30 string key = 1; 31 32 oneof typed_value { 33 bool bool_value = 2; 34 int64 int_value = 3; 35 } 36 } 37 38 // Attributes of this domain. May be used for filtering. 39 repeated Attribute attribute = 3; 40 } 41 42 // IP for routing decision, in CIDR form. 43 message CIDR { 44 // IP address, should be either 4 or 16 bytes. 45 bytes ip = 1; 46 47 // Number of leading ones in the network mask. 48 uint32 prefix = 2; 49 } 50 51 message GeoIP { 52 string country_code = 1; 53 repeated CIDR cidr = 2; 54 bool reverse_match = 3; 55 } 56 57 message GeoIPList { 58 repeated GeoIP entry = 1; 59 } 60 61 message GeoSite { 62 string country_code = 1; 63 repeated Domain domain = 2; 64 } 65 66 message GeoSiteList { 67 repeated GeoSite entry = 1; 68 }