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