Hunter0x7c7
2022-08-11 a82f9cb69f63aaeba40c024960deda7d75b9fece
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
syntax = "proto3";
 
package v2ray.core.app.dns;
option csharp_namespace = "V2Ray.Core.App.Dns";
option go_package = "github.com/v2fly/v2ray-core/v5/app/dns";
option java_package = "com.v2ray.core.app.dns";
option java_multiple_files = true;
 
import "common/net/address.proto";
import "common/net/destination.proto";
import "app/router/routercommon/common.proto";
 
import "common/protoext/extensions.proto";
 
message NameServer {
  v2ray.core.common.net.Endpoint address = 1;
  bytes client_ip = 5;
  bool skipFallback = 6;
 
  message PriorityDomain {
    DomainMatchingType type = 1;
    string domain = 2;
  }
 
  message OriginalRule {
    string rule = 1;
    uint32 size = 2;
  }
 
  repeated PriorityDomain prioritized_domain = 2;
  repeated v2ray.core.app.router.routercommon.GeoIP geoip = 3;
  repeated OriginalRule original_rules = 4;
}
 
enum DomainMatchingType {
  Full = 0;
  Subdomain = 1;
  Keyword = 2;
  Regex = 3;
}
 
enum QueryStrategy {
  USE_IP = 0;
  USE_IP4 = 1;
  USE_IP6 = 2;
}
 
 
message HostMapping {
  DomainMatchingType type = 1;
  string domain = 2;
 
  repeated bytes ip = 3;
 
  // ProxiedDomain indicates the mapped domain has the same IP address on this
  // domain. V2Ray will use this domain for IP queries.
  string proxied_domain = 4;
}
 
message Config {
  // Nameservers used by this DNS. Only traditional UDP servers are support at
  // the moment. A special value 'localhost' as a domain address can be set to
  // use DNS on local system.
  repeated v2ray.core.common.net.Endpoint NameServers = 1 [deprecated = true];
 
  // NameServer list used by this DNS client.
  repeated NameServer name_server = 5;
 
  // Static hosts. Domain to IP.
  // Deprecated. Use static_hosts.
  map<string, v2ray.core.common.net.IPOrDomain> Hosts = 2 [deprecated = true];
 
  // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes
  // (IPv6).
  bytes client_ip = 3;
 
  repeated HostMapping static_hosts = 4;
 
  // Tag is the inbound tag of DNS client.
  string tag = 6;
 
  reserved 7;
 
  // DisableCache disables DNS cache
  bool disableCache = 8;
 
  QueryStrategy query_strategy = 9;
 
  bool disableFallback = 10;
 
  bool disableFallbackIfMatch = 11;
}
 
 
message SimplifiedConfig {
  option (v2ray.core.common.protoext.message_opt).type = "service";
  option (v2ray.core.common.protoext.message_opt).short_name = "dns";
 
 
  // Nameservers used by this DNS. Only traditional UDP servers are support at
  // the moment. A special value 'localhost' as a domain address can be set to
  // use DNS on local system.
  reserved 1;
 
  // NameServer list used by this DNS client.
  repeated SimplifiedNameServer name_server = 5;
 
  // Static hosts. Domain to IP.
  // Deprecated. Use static_hosts.
  reserved 2;
 
  // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes
  // (IPv6).
  string client_ip = 3;
 
  repeated HostMapping static_hosts = 4;
 
  // Tag is the inbound tag of DNS client.
  string tag = 6;
 
  reserved 7;
 
  // DisableCache disables DNS cache
  bool disableCache = 8;
 
  QueryStrategy query_strategy = 9;
 
  bool disableFallback = 10;
 
  bool disableFallbackIfMatch = 11;
}
 
 
message SimplifiedHostMapping {
  DomainMatchingType type = 1;
  string domain = 2;
 
  repeated string ip = 3;
 
  // ProxiedDomain indicates the mapped domain has the same IP address on this
  // domain. V2Ray will use this domain for IP queries.
  string proxied_domain = 4;
}
 
message SimplifiedNameServer {
  v2ray.core.common.net.Endpoint address = 1;
  string client_ip = 5;
  bool skipFallback = 6;
 
  message PriorityDomain {
    DomainMatchingType type = 1;
    string domain = 2;
  }
 
  message OriginalRule {
    string rule = 1;
    uint32 size = 2;
  }
 
  repeated PriorityDomain prioritized_domain = 2;
  repeated v2ray.core.app.router.routercommon.GeoIP geoip = 3;
  repeated OriginalRule original_rules = 4;
}