config.pb.go 26 KB

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