config.pb.go 24 KB

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