config.pb.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. package dns
  2. import (
  3. proto "github.com/golang/protobuf/proto"
  4. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  5. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  6. reflect "reflect"
  7. sync "sync"
  8. router "v2ray.com/core/app/router"
  9. net "v2ray.com/core/common/net"
  10. )
  11. const (
  12. // Verify that this generated code is sufficiently up-to-date.
  13. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  14. // Verify that runtime/protoimpl is sufficiently up-to-date.
  15. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  16. )
  17. // This is a compile-time assertion that a sufficiently up-to-date version
  18. // of the legacy proto package is being used.
  19. const _ = proto.ProtoPackageIsVersion4
  20. type DomainMatchingType int32
  21. const (
  22. DomainMatchingType_Full DomainMatchingType = 0
  23. DomainMatchingType_Subdomain DomainMatchingType = 1
  24. DomainMatchingType_Keyword DomainMatchingType = 2
  25. DomainMatchingType_Regex DomainMatchingType = 3
  26. )
  27. // Enum value maps for DomainMatchingType.
  28. var (
  29. DomainMatchingType_name = map[int32]string{
  30. 0: "Full",
  31. 1: "Subdomain",
  32. 2: "Keyword",
  33. 3: "Regex",
  34. }
  35. DomainMatchingType_value = map[string]int32{
  36. "Full": 0,
  37. "Subdomain": 1,
  38. "Keyword": 2,
  39. "Regex": 3,
  40. }
  41. )
  42. func (x DomainMatchingType) Enum() *DomainMatchingType {
  43. p := new(DomainMatchingType)
  44. *p = x
  45. return p
  46. }
  47. func (x DomainMatchingType) String() string {
  48. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  49. }
  50. func (DomainMatchingType) Descriptor() protoreflect.EnumDescriptor {
  51. return file_v2ray_com_core_app_dns_config_proto_enumTypes[0].Descriptor()
  52. }
  53. func (DomainMatchingType) Type() protoreflect.EnumType {
  54. return &file_v2ray_com_core_app_dns_config_proto_enumTypes[0]
  55. }
  56. func (x DomainMatchingType) Number() protoreflect.EnumNumber {
  57. return protoreflect.EnumNumber(x)
  58. }
  59. // Deprecated: Use DomainMatchingType.Descriptor instead.
  60. func (DomainMatchingType) EnumDescriptor() ([]byte, []int) {
  61. return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{0}
  62. }
  63. type NameServer struct {
  64. state protoimpl.MessageState
  65. sizeCache protoimpl.SizeCache
  66. unknownFields protoimpl.UnknownFields
  67. Address *net.Endpoint `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  68. PrioritizedDomain []*NameServer_PriorityDomain `protobuf:"bytes,2,rep,name=prioritized_domain,json=prioritizedDomain,proto3" json:"prioritized_domain,omitempty"`
  69. Geoip []*router.GeoIP `protobuf:"bytes,3,rep,name=geoip,proto3" json:"geoip,omitempty"`
  70. }
  71. func (x *NameServer) Reset() {
  72. *x = NameServer{}
  73. if protoimpl.UnsafeEnabled {
  74. mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[0]
  75. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  76. ms.StoreMessageInfo(mi)
  77. }
  78. }
  79. func (x *NameServer) String() string {
  80. return protoimpl.X.MessageStringOf(x)
  81. }
  82. func (*NameServer) ProtoMessage() {}
  83. func (x *NameServer) ProtoReflect() protoreflect.Message {
  84. mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[0]
  85. if protoimpl.UnsafeEnabled && x != nil {
  86. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  87. if ms.LoadMessageInfo() == nil {
  88. ms.StoreMessageInfo(mi)
  89. }
  90. return ms
  91. }
  92. return mi.MessageOf(x)
  93. }
  94. // Deprecated: Use NameServer.ProtoReflect.Descriptor instead.
  95. func (*NameServer) Descriptor() ([]byte, []int) {
  96. return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{0}
  97. }
  98. func (x *NameServer) GetAddress() *net.Endpoint {
  99. if x != nil {
  100. return x.Address
  101. }
  102. return nil
  103. }
  104. func (x *NameServer) GetPrioritizedDomain() []*NameServer_PriorityDomain {
  105. if x != nil {
  106. return x.PrioritizedDomain
  107. }
  108. return nil
  109. }
  110. func (x *NameServer) GetGeoip() []*router.GeoIP {
  111. if x != nil {
  112. return x.Geoip
  113. }
  114. return nil
  115. }
  116. type Config struct {
  117. state protoimpl.MessageState
  118. sizeCache protoimpl.SizeCache
  119. unknownFields protoimpl.UnknownFields
  120. // Nameservers used by this DNS. Only traditional UDP servers are support at the moment.
  121. // A special value 'localhost' as a domain address can be set to use DNS on local system.
  122. //
  123. // Deprecated: Do not use.
  124. NameServers []*net.Endpoint `protobuf:"bytes,1,rep,name=NameServers,proto3" json:"NameServers,omitempty"`
  125. // NameServer list used by this DNS client.
  126. NameServer []*NameServer `protobuf:"bytes,5,rep,name=name_server,json=nameServer,proto3" json:"name_server,omitempty"`
  127. // Static hosts. Domain to IP.
  128. // Deprecated. Use static_hosts.
  129. //
  130. // Deprecated: Do not use.
  131. Hosts map[string]*net.IPOrDomain `protobuf:"bytes,2,rep,name=Hosts,proto3" json:"Hosts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  132. // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes (IPv6).
  133. ClientIp []byte `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
  134. StaticHosts []*Config_HostMapping `protobuf:"bytes,4,rep,name=static_hosts,json=staticHosts,proto3" json:"static_hosts,omitempty"`
  135. // Tag is the inbound tag of DNS client.
  136. Tag string `protobuf:"bytes,6,opt,name=tag,proto3" json:"tag,omitempty"`
  137. }
  138. func (x *Config) Reset() {
  139. *x = Config{}
  140. if protoimpl.UnsafeEnabled {
  141. mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[1]
  142. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  143. ms.StoreMessageInfo(mi)
  144. }
  145. }
  146. func (x *Config) String() string {
  147. return protoimpl.X.MessageStringOf(x)
  148. }
  149. func (*Config) ProtoMessage() {}
  150. func (x *Config) ProtoReflect() protoreflect.Message {
  151. mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[1]
  152. if protoimpl.UnsafeEnabled && x != nil {
  153. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  154. if ms.LoadMessageInfo() == nil {
  155. ms.StoreMessageInfo(mi)
  156. }
  157. return ms
  158. }
  159. return mi.MessageOf(x)
  160. }
  161. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  162. func (*Config) Descriptor() ([]byte, []int) {
  163. return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{1}
  164. }
  165. // Deprecated: Do not use.
  166. func (x *Config) GetNameServers() []*net.Endpoint {
  167. if x != nil {
  168. return x.NameServers
  169. }
  170. return nil
  171. }
  172. func (x *Config) GetNameServer() []*NameServer {
  173. if x != nil {
  174. return x.NameServer
  175. }
  176. return nil
  177. }
  178. // Deprecated: Do not use.
  179. func (x *Config) GetHosts() map[string]*net.IPOrDomain {
  180. if x != nil {
  181. return x.Hosts
  182. }
  183. return nil
  184. }
  185. func (x *Config) GetClientIp() []byte {
  186. if x != nil {
  187. return x.ClientIp
  188. }
  189. return nil
  190. }
  191. func (x *Config) GetStaticHosts() []*Config_HostMapping {
  192. if x != nil {
  193. return x.StaticHosts
  194. }
  195. return nil
  196. }
  197. func (x *Config) GetTag() string {
  198. if x != nil {
  199. return x.Tag
  200. }
  201. return ""
  202. }
  203. type NameServer_PriorityDomain struct {
  204. state protoimpl.MessageState
  205. sizeCache protoimpl.SizeCache
  206. unknownFields protoimpl.UnknownFields
  207. Type DomainMatchingType `protobuf:"varint,1,opt,name=type,proto3,enum=v2ray.core.app.dns.DomainMatchingType" json:"type,omitempty"`
  208. Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
  209. }
  210. func (x *NameServer_PriorityDomain) Reset() {
  211. *x = NameServer_PriorityDomain{}
  212. if protoimpl.UnsafeEnabled {
  213. mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[2]
  214. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  215. ms.StoreMessageInfo(mi)
  216. }
  217. }
  218. func (x *NameServer_PriorityDomain) String() string {
  219. return protoimpl.X.MessageStringOf(x)
  220. }
  221. func (*NameServer_PriorityDomain) ProtoMessage() {}
  222. func (x *NameServer_PriorityDomain) ProtoReflect() protoreflect.Message {
  223. mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[2]
  224. if protoimpl.UnsafeEnabled && x != nil {
  225. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  226. if ms.LoadMessageInfo() == nil {
  227. ms.StoreMessageInfo(mi)
  228. }
  229. return ms
  230. }
  231. return mi.MessageOf(x)
  232. }
  233. // Deprecated: Use NameServer_PriorityDomain.ProtoReflect.Descriptor instead.
  234. func (*NameServer_PriorityDomain) Descriptor() ([]byte, []int) {
  235. return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{0, 0}
  236. }
  237. func (x *NameServer_PriorityDomain) GetType() DomainMatchingType {
  238. if x != nil {
  239. return x.Type
  240. }
  241. return DomainMatchingType_Full
  242. }
  243. func (x *NameServer_PriorityDomain) GetDomain() string {
  244. if x != nil {
  245. return x.Domain
  246. }
  247. return ""
  248. }
  249. type Config_HostMapping struct {
  250. state protoimpl.MessageState
  251. sizeCache protoimpl.SizeCache
  252. unknownFields protoimpl.UnknownFields
  253. Type DomainMatchingType `protobuf:"varint,1,opt,name=type,proto3,enum=v2ray.core.app.dns.DomainMatchingType" json:"type,omitempty"`
  254. Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
  255. Ip [][]byte `protobuf:"bytes,3,rep,name=ip,proto3" json:"ip,omitempty"`
  256. // ProxiedDomain indicates the mapped domain has the same IP address on this domain. V2Ray will use this domain for IP queries.
  257. // This field is only effective if ip is empty.
  258. ProxiedDomain string `protobuf:"bytes,4,opt,name=proxied_domain,json=proxiedDomain,proto3" json:"proxied_domain,omitempty"`
  259. }
  260. func (x *Config_HostMapping) Reset() {
  261. *x = Config_HostMapping{}
  262. if protoimpl.UnsafeEnabled {
  263. mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[4]
  264. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  265. ms.StoreMessageInfo(mi)
  266. }
  267. }
  268. func (x *Config_HostMapping) String() string {
  269. return protoimpl.X.MessageStringOf(x)
  270. }
  271. func (*Config_HostMapping) ProtoMessage() {}
  272. func (x *Config_HostMapping) ProtoReflect() protoreflect.Message {
  273. mi := &file_v2ray_com_core_app_dns_config_proto_msgTypes[4]
  274. if protoimpl.UnsafeEnabled && x != nil {
  275. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  276. if ms.LoadMessageInfo() == nil {
  277. ms.StoreMessageInfo(mi)
  278. }
  279. return ms
  280. }
  281. return mi.MessageOf(x)
  282. }
  283. // Deprecated: Use Config_HostMapping.ProtoReflect.Descriptor instead.
  284. func (*Config_HostMapping) Descriptor() ([]byte, []int) {
  285. return file_v2ray_com_core_app_dns_config_proto_rawDescGZIP(), []int{1, 1}
  286. }
  287. func (x *Config_HostMapping) GetType() DomainMatchingType {
  288. if x != nil {
  289. return x.Type
  290. }
  291. return DomainMatchingType_Full
  292. }
  293. func (x *Config_HostMapping) GetDomain() string {
  294. if x != nil {
  295. return x.Domain
  296. }
  297. return ""
  298. }
  299. func (x *Config_HostMapping) GetIp() [][]byte {
  300. if x != nil {
  301. return x.Ip
  302. }
  303. return nil
  304. }
  305. func (x *Config_HostMapping) GetProxiedDomain() string {
  306. if x != nil {
  307. return x.ProxiedDomain
  308. }
  309. return ""
  310. }
  311. var File_v2ray_com_core_app_dns_config_proto protoreflect.FileDescriptor
  312. var file_v2ray_com_core_app_dns_config_proto_rawDesc = []byte{
  313. 0x0a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65,
  314. 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
  315. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
  316. 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x1a, 0x27, 0x76, 0x32, 0x72, 0x61, 0x79,
  317. 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
  318. 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f,
  319. 0x74, 0x6f, 0x1a, 0x2b, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
  320. 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x65,
  321. 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
  322. 0x26, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
  323. 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
  324. 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, 0x02, 0x0a, 0x0a, 0x4e, 0x61, 0x6d, 0x65,
  325. 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
  326. 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e,
  327. 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e,
  328. 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
  329. 0x73, 0x12, 0x5c, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64,
  330. 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e,
  331. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64,
  332. 0x6e, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x50, 0x72,
  333. 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x11, 0x70, 0x72,
  334. 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12,
  335. 0x32, 0x0a, 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c,
  336. 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e,
  337. 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, 0x05, 0x67, 0x65,
  338. 0x6f, 0x69, 0x70, 0x1a, 0x64, 0x0a, 0x0e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x44,
  339. 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
  340. 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65,
  341. 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4d,
  342. 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
  343. 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
  344. 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0xc3, 0x04, 0x0a, 0x06, 0x43, 0x6f,
  345. 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76,
  346. 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61,
  347. 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65,
  348. 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b,
  349. 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x6e,
  350. 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
  351. 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70,
  352. 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
  353. 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x05,
  354. 0x48, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x32,
  355. 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73,
  356. 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x74,
  357. 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x1b, 0x0a,
  358. 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,
  359. 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x12, 0x49, 0x0a, 0x0c, 0x73, 0x74,
  360. 0x61, 0x74, 0x69, 0x63, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
  361. 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70,
  362. 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x48, 0x6f, 0x73,
  363. 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63,
  364. 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01,
  365. 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x1a, 0x5b, 0x0a, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x73,
  366. 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
  367. 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
  368. 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63,
  369. 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49,
  370. 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
  371. 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x98, 0x01, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x4d, 0x61, 0x70,
  372. 0x70, 0x69, 0x6e, 0x67, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
  373. 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
  374. 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x61,
  375. 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
  376. 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
  377. 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03,
  378. 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x78,
  379. 0x69, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
  380. 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x65, 0x64, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2a,
  381. 0x45, 0x0a, 0x12, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e,
  382. 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12,
  383. 0x0d, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x01, 0x12, 0x0b,
  384. 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52,
  385. 0x65, 0x67, 0x65, 0x78, 0x10, 0x03, 0x42, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32,
  386. 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73,
  387. 0x50, 0x01, 0x5a, 0x03, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e,
  388. 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72,
  389. 0x6f, 0x74, 0x6f, 0x33,
  390. }
  391. var (
  392. file_v2ray_com_core_app_dns_config_proto_rawDescOnce sync.Once
  393. file_v2ray_com_core_app_dns_config_proto_rawDescData = file_v2ray_com_core_app_dns_config_proto_rawDesc
  394. )
  395. func file_v2ray_com_core_app_dns_config_proto_rawDescGZIP() []byte {
  396. file_v2ray_com_core_app_dns_config_proto_rawDescOnce.Do(func() {
  397. file_v2ray_com_core_app_dns_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_dns_config_proto_rawDescData)
  398. })
  399. return file_v2ray_com_core_app_dns_config_proto_rawDescData
  400. }
  401. var file_v2ray_com_core_app_dns_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  402. var file_v2ray_com_core_app_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
  403. var file_v2ray_com_core_app_dns_config_proto_goTypes = []interface{}{
  404. (DomainMatchingType)(0), // 0: v2ray.core.app.dns.DomainMatchingType
  405. (*NameServer)(nil), // 1: v2ray.core.app.dns.NameServer
  406. (*Config)(nil), // 2: v2ray.core.app.dns.Config
  407. (*NameServer_PriorityDomain)(nil), // 3: v2ray.core.app.dns.NameServer.PriorityDomain
  408. nil, // 4: v2ray.core.app.dns.Config.HostsEntry
  409. (*Config_HostMapping)(nil), // 5: v2ray.core.app.dns.Config.HostMapping
  410. (*net.Endpoint)(nil), // 6: v2ray.core.common.net.Endpoint
  411. (*router.GeoIP)(nil), // 7: v2ray.core.app.router.GeoIP
  412. (*net.IPOrDomain)(nil), // 8: v2ray.core.common.net.IPOrDomain
  413. }
  414. var file_v2ray_com_core_app_dns_config_proto_depIdxs = []int32{
  415. 6, // 0: v2ray.core.app.dns.NameServer.address:type_name -> v2ray.core.common.net.Endpoint
  416. 3, // 1: v2ray.core.app.dns.NameServer.prioritized_domain:type_name -> v2ray.core.app.dns.NameServer.PriorityDomain
  417. 7, // 2: v2ray.core.app.dns.NameServer.geoip:type_name -> v2ray.core.app.router.GeoIP
  418. 6, // 3: v2ray.core.app.dns.Config.NameServers:type_name -> v2ray.core.common.net.Endpoint
  419. 1, // 4: v2ray.core.app.dns.Config.name_server:type_name -> v2ray.core.app.dns.NameServer
  420. 4, // 5: v2ray.core.app.dns.Config.Hosts:type_name -> v2ray.core.app.dns.Config.HostsEntry
  421. 5, // 6: v2ray.core.app.dns.Config.static_hosts:type_name -> v2ray.core.app.dns.Config.HostMapping
  422. 0, // 7: v2ray.core.app.dns.NameServer.PriorityDomain.type:type_name -> v2ray.core.app.dns.DomainMatchingType
  423. 8, // 8: v2ray.core.app.dns.Config.HostsEntry.value:type_name -> v2ray.core.common.net.IPOrDomain
  424. 0, // 9: v2ray.core.app.dns.Config.HostMapping.type:type_name -> v2ray.core.app.dns.DomainMatchingType
  425. 10, // [10:10] is the sub-list for method output_type
  426. 10, // [10:10] is the sub-list for method input_type
  427. 10, // [10:10] is the sub-list for extension type_name
  428. 10, // [10:10] is the sub-list for extension extendee
  429. 0, // [0:10] is the sub-list for field type_name
  430. }
  431. func init() { file_v2ray_com_core_app_dns_config_proto_init() }
  432. func file_v2ray_com_core_app_dns_config_proto_init() {
  433. if File_v2ray_com_core_app_dns_config_proto != nil {
  434. return
  435. }
  436. if !protoimpl.UnsafeEnabled {
  437. file_v2ray_com_core_app_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  438. switch v := v.(*NameServer); i {
  439. case 0:
  440. return &v.state
  441. case 1:
  442. return &v.sizeCache
  443. case 2:
  444. return &v.unknownFields
  445. default:
  446. return nil
  447. }
  448. }
  449. file_v2ray_com_core_app_dns_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  450. switch v := v.(*Config); i {
  451. case 0:
  452. return &v.state
  453. case 1:
  454. return &v.sizeCache
  455. case 2:
  456. return &v.unknownFields
  457. default:
  458. return nil
  459. }
  460. }
  461. file_v2ray_com_core_app_dns_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  462. switch v := v.(*NameServer_PriorityDomain); i {
  463. case 0:
  464. return &v.state
  465. case 1:
  466. return &v.sizeCache
  467. case 2:
  468. return &v.unknownFields
  469. default:
  470. return nil
  471. }
  472. }
  473. file_v2ray_com_core_app_dns_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  474. switch v := v.(*Config_HostMapping); i {
  475. case 0:
  476. return &v.state
  477. case 1:
  478. return &v.sizeCache
  479. case 2:
  480. return &v.unknownFields
  481. default:
  482. return nil
  483. }
  484. }
  485. }
  486. type x struct{}
  487. out := protoimpl.TypeBuilder{
  488. File: protoimpl.DescBuilder{
  489. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  490. RawDescriptor: file_v2ray_com_core_app_dns_config_proto_rawDesc,
  491. NumEnums: 1,
  492. NumMessages: 5,
  493. NumExtensions: 0,
  494. NumServices: 0,
  495. },
  496. GoTypes: file_v2ray_com_core_app_dns_config_proto_goTypes,
  497. DependencyIndexes: file_v2ray_com_core_app_dns_config_proto_depIdxs,
  498. EnumInfos: file_v2ray_com_core_app_dns_config_proto_enumTypes,
  499. MessageInfos: file_v2ray_com_core_app_dns_config_proto_msgTypes,
  500. }.Build()
  501. File_v2ray_com_core_app_dns_config_proto = out.File
  502. file_v2ray_com_core_app_dns_config_proto_rawDesc = nil
  503. file_v2ray_com_core_app_dns_config_proto_goTypes = nil
  504. file_v2ray_com_core_app_dns_config_proto_depIdxs = nil
  505. }