config.pb.go 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.11
  4. // protoc v6.33.5
  5. // source: app/dns/config.proto
  6. package dns
  7. import (
  8. router "github.com/xtls/xray-core/app/router"
  9. net "github.com/xtls/xray-core/common/net"
  10. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  11. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  12. reflect "reflect"
  13. sync "sync"
  14. unsafe "unsafe"
  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 DomainMatchingType int32
  23. const (
  24. DomainMatchingType_Full DomainMatchingType = 0
  25. DomainMatchingType_Subdomain DomainMatchingType = 1
  26. DomainMatchingType_Keyword DomainMatchingType = 2
  27. DomainMatchingType_Regex DomainMatchingType = 3
  28. )
  29. // Enum value maps for DomainMatchingType.
  30. var (
  31. DomainMatchingType_name = map[int32]string{
  32. 0: "Full",
  33. 1: "Subdomain",
  34. 2: "Keyword",
  35. 3: "Regex",
  36. }
  37. DomainMatchingType_value = map[string]int32{
  38. "Full": 0,
  39. "Subdomain": 1,
  40. "Keyword": 2,
  41. "Regex": 3,
  42. }
  43. )
  44. func (x DomainMatchingType) Enum() *DomainMatchingType {
  45. p := new(DomainMatchingType)
  46. *p = x
  47. return p
  48. }
  49. func (x DomainMatchingType) String() string {
  50. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  51. }
  52. func (DomainMatchingType) Descriptor() protoreflect.EnumDescriptor {
  53. return file_app_dns_config_proto_enumTypes[0].Descriptor()
  54. }
  55. func (DomainMatchingType) Type() protoreflect.EnumType {
  56. return &file_app_dns_config_proto_enumTypes[0]
  57. }
  58. func (x DomainMatchingType) Number() protoreflect.EnumNumber {
  59. return protoreflect.EnumNumber(x)
  60. }
  61. // Deprecated: Use DomainMatchingType.Descriptor instead.
  62. func (DomainMatchingType) EnumDescriptor() ([]byte, []int) {
  63. return file_app_dns_config_proto_rawDescGZIP(), []int{0}
  64. }
  65. type QueryStrategy int32
  66. const (
  67. QueryStrategy_USE_IP QueryStrategy = 0
  68. QueryStrategy_USE_IP4 QueryStrategy = 1
  69. QueryStrategy_USE_IP6 QueryStrategy = 2
  70. QueryStrategy_USE_SYS QueryStrategy = 3
  71. )
  72. // Enum value maps for QueryStrategy.
  73. var (
  74. QueryStrategy_name = map[int32]string{
  75. 0: "USE_IP",
  76. 1: "USE_IP4",
  77. 2: "USE_IP6",
  78. 3: "USE_SYS",
  79. }
  80. QueryStrategy_value = map[string]int32{
  81. "USE_IP": 0,
  82. "USE_IP4": 1,
  83. "USE_IP6": 2,
  84. "USE_SYS": 3,
  85. }
  86. )
  87. func (x QueryStrategy) Enum() *QueryStrategy {
  88. p := new(QueryStrategy)
  89. *p = x
  90. return p
  91. }
  92. func (x QueryStrategy) String() string {
  93. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  94. }
  95. func (QueryStrategy) Descriptor() protoreflect.EnumDescriptor {
  96. return file_app_dns_config_proto_enumTypes[1].Descriptor()
  97. }
  98. func (QueryStrategy) Type() protoreflect.EnumType {
  99. return &file_app_dns_config_proto_enumTypes[1]
  100. }
  101. func (x QueryStrategy) Number() protoreflect.EnumNumber {
  102. return protoreflect.EnumNumber(x)
  103. }
  104. // Deprecated: Use QueryStrategy.Descriptor instead.
  105. func (QueryStrategy) EnumDescriptor() ([]byte, []int) {
  106. return file_app_dns_config_proto_rawDescGZIP(), []int{1}
  107. }
  108. type NameServer struct {
  109. state protoimpl.MessageState `protogen:"open.v1"`
  110. Address *net.Endpoint `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  111. ClientIp []byte `protobuf:"bytes,5,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
  112. SkipFallback bool `protobuf:"varint,6,opt,name=skipFallback,proto3" json:"skipFallback,omitempty"`
  113. PrioritizedDomain []*NameServer_PriorityDomain `protobuf:"bytes,2,rep,name=prioritized_domain,json=prioritizedDomain,proto3" json:"prioritized_domain,omitempty"`
  114. ExpectedGeoip []*router.GeoIP `protobuf:"bytes,3,rep,name=expected_geoip,json=expectedGeoip,proto3" json:"expected_geoip,omitempty"`
  115. OriginalRules []*NameServer_OriginalRule `protobuf:"bytes,4,rep,name=original_rules,json=originalRules,proto3" json:"original_rules,omitempty"`
  116. QueryStrategy QueryStrategy `protobuf:"varint,7,opt,name=query_strategy,json=queryStrategy,proto3,enum=xray.app.dns.QueryStrategy" json:"query_strategy,omitempty"`
  117. ActPrior bool `protobuf:"varint,8,opt,name=actPrior,proto3" json:"actPrior,omitempty"`
  118. Tag string `protobuf:"bytes,9,opt,name=tag,proto3" json:"tag,omitempty"`
  119. TimeoutMs uint64 `protobuf:"varint,10,opt,name=timeoutMs,proto3" json:"timeoutMs,omitempty"`
  120. DisableCache *bool `protobuf:"varint,11,opt,name=disableCache,proto3,oneof" json:"disableCache,omitempty"`
  121. ServeStale *bool `protobuf:"varint,15,opt,name=serveStale,proto3,oneof" json:"serveStale,omitempty"`
  122. ServeExpiredTTL *uint32 `protobuf:"varint,16,opt,name=serveExpiredTTL,proto3,oneof" json:"serveExpiredTTL,omitempty"`
  123. FinalQuery bool `protobuf:"varint,12,opt,name=finalQuery,proto3" json:"finalQuery,omitempty"`
  124. UnexpectedGeoip []*router.GeoIP `protobuf:"bytes,13,rep,name=unexpected_geoip,json=unexpectedGeoip,proto3" json:"unexpected_geoip,omitempty"`
  125. ActUnprior bool `protobuf:"varint,14,opt,name=actUnprior,proto3" json:"actUnprior,omitempty"`
  126. PolicyID uint32 `protobuf:"varint,17,opt,name=policyID,proto3" json:"policyID,omitempty"`
  127. unknownFields protoimpl.UnknownFields
  128. sizeCache protoimpl.SizeCache
  129. }
  130. func (x *NameServer) Reset() {
  131. *x = NameServer{}
  132. mi := &file_app_dns_config_proto_msgTypes[0]
  133. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  134. ms.StoreMessageInfo(mi)
  135. }
  136. func (x *NameServer) String() string {
  137. return protoimpl.X.MessageStringOf(x)
  138. }
  139. func (*NameServer) ProtoMessage() {}
  140. func (x *NameServer) ProtoReflect() protoreflect.Message {
  141. mi := &file_app_dns_config_proto_msgTypes[0]
  142. if x != nil {
  143. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  144. if ms.LoadMessageInfo() == nil {
  145. ms.StoreMessageInfo(mi)
  146. }
  147. return ms
  148. }
  149. return mi.MessageOf(x)
  150. }
  151. // Deprecated: Use NameServer.ProtoReflect.Descriptor instead.
  152. func (*NameServer) Descriptor() ([]byte, []int) {
  153. return file_app_dns_config_proto_rawDescGZIP(), []int{0}
  154. }
  155. func (x *NameServer) GetAddress() *net.Endpoint {
  156. if x != nil {
  157. return x.Address
  158. }
  159. return nil
  160. }
  161. func (x *NameServer) GetClientIp() []byte {
  162. if x != nil {
  163. return x.ClientIp
  164. }
  165. return nil
  166. }
  167. func (x *NameServer) GetSkipFallback() bool {
  168. if x != nil {
  169. return x.SkipFallback
  170. }
  171. return false
  172. }
  173. func (x *NameServer) GetPrioritizedDomain() []*NameServer_PriorityDomain {
  174. if x != nil {
  175. return x.PrioritizedDomain
  176. }
  177. return nil
  178. }
  179. func (x *NameServer) GetExpectedGeoip() []*router.GeoIP {
  180. if x != nil {
  181. return x.ExpectedGeoip
  182. }
  183. return nil
  184. }
  185. func (x *NameServer) GetOriginalRules() []*NameServer_OriginalRule {
  186. if x != nil {
  187. return x.OriginalRules
  188. }
  189. return nil
  190. }
  191. func (x *NameServer) GetQueryStrategy() QueryStrategy {
  192. if x != nil {
  193. return x.QueryStrategy
  194. }
  195. return QueryStrategy_USE_IP
  196. }
  197. func (x *NameServer) GetActPrior() bool {
  198. if x != nil {
  199. return x.ActPrior
  200. }
  201. return false
  202. }
  203. func (x *NameServer) GetTag() string {
  204. if x != nil {
  205. return x.Tag
  206. }
  207. return ""
  208. }
  209. func (x *NameServer) GetTimeoutMs() uint64 {
  210. if x != nil {
  211. return x.TimeoutMs
  212. }
  213. return 0
  214. }
  215. func (x *NameServer) GetDisableCache() bool {
  216. if x != nil && x.DisableCache != nil {
  217. return *x.DisableCache
  218. }
  219. return false
  220. }
  221. func (x *NameServer) GetServeStale() bool {
  222. if x != nil && x.ServeStale != nil {
  223. return *x.ServeStale
  224. }
  225. return false
  226. }
  227. func (x *NameServer) GetServeExpiredTTL() uint32 {
  228. if x != nil && x.ServeExpiredTTL != nil {
  229. return *x.ServeExpiredTTL
  230. }
  231. return 0
  232. }
  233. func (x *NameServer) GetFinalQuery() bool {
  234. if x != nil {
  235. return x.FinalQuery
  236. }
  237. return false
  238. }
  239. func (x *NameServer) GetUnexpectedGeoip() []*router.GeoIP {
  240. if x != nil {
  241. return x.UnexpectedGeoip
  242. }
  243. return nil
  244. }
  245. func (x *NameServer) GetActUnprior() bool {
  246. if x != nil {
  247. return x.ActUnprior
  248. }
  249. return false
  250. }
  251. func (x *NameServer) GetPolicyID() uint32 {
  252. if x != nil {
  253. return x.PolicyID
  254. }
  255. return 0
  256. }
  257. type Config struct {
  258. state protoimpl.MessageState `protogen:"open.v1"`
  259. // NameServer list used by this DNS client.
  260. // A special value 'localhost' as a domain address can be set to use DNS on local system.
  261. NameServer []*NameServer `protobuf:"bytes,5,rep,name=name_server,json=nameServer,proto3" json:"name_server,omitempty"`
  262. // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes
  263. // (IPv6).
  264. ClientIp []byte `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
  265. StaticHosts []*Config_HostMapping `protobuf:"bytes,4,rep,name=static_hosts,json=staticHosts,proto3" json:"static_hosts,omitempty"`
  266. // Tag is the inbound tag of DNS client.
  267. Tag string `protobuf:"bytes,6,opt,name=tag,proto3" json:"tag,omitempty"`
  268. // DisableCache disables DNS cache
  269. DisableCache bool `protobuf:"varint,8,opt,name=disableCache,proto3" json:"disableCache,omitempty"`
  270. ServeStale bool `protobuf:"varint,12,opt,name=serveStale,proto3" json:"serveStale,omitempty"`
  271. ServeExpiredTTL uint32 `protobuf:"varint,13,opt,name=serveExpiredTTL,proto3" json:"serveExpiredTTL,omitempty"`
  272. QueryStrategy QueryStrategy `protobuf:"varint,9,opt,name=query_strategy,json=queryStrategy,proto3,enum=xray.app.dns.QueryStrategy" json:"query_strategy,omitempty"`
  273. DisableFallback bool `protobuf:"varint,10,opt,name=disableFallback,proto3" json:"disableFallback,omitempty"`
  274. DisableFallbackIfMatch bool `protobuf:"varint,11,opt,name=disableFallbackIfMatch,proto3" json:"disableFallbackIfMatch,omitempty"`
  275. EnableParallelQuery bool `protobuf:"varint,14,opt,name=enableParallelQuery,proto3" json:"enableParallelQuery,omitempty"`
  276. unknownFields protoimpl.UnknownFields
  277. sizeCache protoimpl.SizeCache
  278. }
  279. func (x *Config) Reset() {
  280. *x = Config{}
  281. mi := &file_app_dns_config_proto_msgTypes[1]
  282. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  283. ms.StoreMessageInfo(mi)
  284. }
  285. func (x *Config) String() string {
  286. return protoimpl.X.MessageStringOf(x)
  287. }
  288. func (*Config) ProtoMessage() {}
  289. func (x *Config) ProtoReflect() protoreflect.Message {
  290. mi := &file_app_dns_config_proto_msgTypes[1]
  291. if x != nil {
  292. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  293. if ms.LoadMessageInfo() == nil {
  294. ms.StoreMessageInfo(mi)
  295. }
  296. return ms
  297. }
  298. return mi.MessageOf(x)
  299. }
  300. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  301. func (*Config) Descriptor() ([]byte, []int) {
  302. return file_app_dns_config_proto_rawDescGZIP(), []int{1}
  303. }
  304. func (x *Config) GetNameServer() []*NameServer {
  305. if x != nil {
  306. return x.NameServer
  307. }
  308. return nil
  309. }
  310. func (x *Config) GetClientIp() []byte {
  311. if x != nil {
  312. return x.ClientIp
  313. }
  314. return nil
  315. }
  316. func (x *Config) GetStaticHosts() []*Config_HostMapping {
  317. if x != nil {
  318. return x.StaticHosts
  319. }
  320. return nil
  321. }
  322. func (x *Config) GetTag() string {
  323. if x != nil {
  324. return x.Tag
  325. }
  326. return ""
  327. }
  328. func (x *Config) GetDisableCache() bool {
  329. if x != nil {
  330. return x.DisableCache
  331. }
  332. return false
  333. }
  334. func (x *Config) GetServeStale() bool {
  335. if x != nil {
  336. return x.ServeStale
  337. }
  338. return false
  339. }
  340. func (x *Config) GetServeExpiredTTL() uint32 {
  341. if x != nil {
  342. return x.ServeExpiredTTL
  343. }
  344. return 0
  345. }
  346. func (x *Config) GetQueryStrategy() QueryStrategy {
  347. if x != nil {
  348. return x.QueryStrategy
  349. }
  350. return QueryStrategy_USE_IP
  351. }
  352. func (x *Config) GetDisableFallback() bool {
  353. if x != nil {
  354. return x.DisableFallback
  355. }
  356. return false
  357. }
  358. func (x *Config) GetDisableFallbackIfMatch() bool {
  359. if x != nil {
  360. return x.DisableFallbackIfMatch
  361. }
  362. return false
  363. }
  364. func (x *Config) GetEnableParallelQuery() bool {
  365. if x != nil {
  366. return x.EnableParallelQuery
  367. }
  368. return false
  369. }
  370. type NameServer_PriorityDomain struct {
  371. state protoimpl.MessageState `protogen:"open.v1"`
  372. Type DomainMatchingType `protobuf:"varint,1,opt,name=type,proto3,enum=xray.app.dns.DomainMatchingType" json:"type,omitempty"`
  373. Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
  374. unknownFields protoimpl.UnknownFields
  375. sizeCache protoimpl.SizeCache
  376. }
  377. func (x *NameServer_PriorityDomain) Reset() {
  378. *x = NameServer_PriorityDomain{}
  379. mi := &file_app_dns_config_proto_msgTypes[2]
  380. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  381. ms.StoreMessageInfo(mi)
  382. }
  383. func (x *NameServer_PriorityDomain) String() string {
  384. return protoimpl.X.MessageStringOf(x)
  385. }
  386. func (*NameServer_PriorityDomain) ProtoMessage() {}
  387. func (x *NameServer_PriorityDomain) ProtoReflect() protoreflect.Message {
  388. mi := &file_app_dns_config_proto_msgTypes[2]
  389. if x != nil {
  390. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  391. if ms.LoadMessageInfo() == nil {
  392. ms.StoreMessageInfo(mi)
  393. }
  394. return ms
  395. }
  396. return mi.MessageOf(x)
  397. }
  398. // Deprecated: Use NameServer_PriorityDomain.ProtoReflect.Descriptor instead.
  399. func (*NameServer_PriorityDomain) Descriptor() ([]byte, []int) {
  400. return file_app_dns_config_proto_rawDescGZIP(), []int{0, 0}
  401. }
  402. func (x *NameServer_PriorityDomain) GetType() DomainMatchingType {
  403. if x != nil {
  404. return x.Type
  405. }
  406. return DomainMatchingType_Full
  407. }
  408. func (x *NameServer_PriorityDomain) GetDomain() string {
  409. if x != nil {
  410. return x.Domain
  411. }
  412. return ""
  413. }
  414. type NameServer_OriginalRule struct {
  415. state protoimpl.MessageState `protogen:"open.v1"`
  416. Rule string `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"`
  417. Size uint32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
  418. unknownFields protoimpl.UnknownFields
  419. sizeCache protoimpl.SizeCache
  420. }
  421. func (x *NameServer_OriginalRule) Reset() {
  422. *x = NameServer_OriginalRule{}
  423. mi := &file_app_dns_config_proto_msgTypes[3]
  424. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  425. ms.StoreMessageInfo(mi)
  426. }
  427. func (x *NameServer_OriginalRule) String() string {
  428. return protoimpl.X.MessageStringOf(x)
  429. }
  430. func (*NameServer_OriginalRule) ProtoMessage() {}
  431. func (x *NameServer_OriginalRule) ProtoReflect() protoreflect.Message {
  432. mi := &file_app_dns_config_proto_msgTypes[3]
  433. if x != nil {
  434. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  435. if ms.LoadMessageInfo() == nil {
  436. ms.StoreMessageInfo(mi)
  437. }
  438. return ms
  439. }
  440. return mi.MessageOf(x)
  441. }
  442. // Deprecated: Use NameServer_OriginalRule.ProtoReflect.Descriptor instead.
  443. func (*NameServer_OriginalRule) Descriptor() ([]byte, []int) {
  444. return file_app_dns_config_proto_rawDescGZIP(), []int{0, 1}
  445. }
  446. func (x *NameServer_OriginalRule) GetRule() string {
  447. if x != nil {
  448. return x.Rule
  449. }
  450. return ""
  451. }
  452. func (x *NameServer_OriginalRule) GetSize() uint32 {
  453. if x != nil {
  454. return x.Size
  455. }
  456. return 0
  457. }
  458. type Config_HostMapping struct {
  459. state protoimpl.MessageState `protogen:"open.v1"`
  460. Type DomainMatchingType `protobuf:"varint,1,opt,name=type,proto3,enum=xray.app.dns.DomainMatchingType" json:"type,omitempty"`
  461. Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
  462. Ip [][]byte `protobuf:"bytes,3,rep,name=ip,proto3" json:"ip,omitempty"`
  463. // ProxiedDomain indicates the mapped domain has the same IP address on this
  464. // domain. Xray will use this domain for IP queries.
  465. ProxiedDomain string `protobuf:"bytes,4,opt,name=proxied_domain,json=proxiedDomain,proto3" json:"proxied_domain,omitempty"`
  466. unknownFields protoimpl.UnknownFields
  467. sizeCache protoimpl.SizeCache
  468. }
  469. func (x *Config_HostMapping) Reset() {
  470. *x = Config_HostMapping{}
  471. mi := &file_app_dns_config_proto_msgTypes[4]
  472. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  473. ms.StoreMessageInfo(mi)
  474. }
  475. func (x *Config_HostMapping) String() string {
  476. return protoimpl.X.MessageStringOf(x)
  477. }
  478. func (*Config_HostMapping) ProtoMessage() {}
  479. func (x *Config_HostMapping) ProtoReflect() protoreflect.Message {
  480. mi := &file_app_dns_config_proto_msgTypes[4]
  481. if x != nil {
  482. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  483. if ms.LoadMessageInfo() == nil {
  484. ms.StoreMessageInfo(mi)
  485. }
  486. return ms
  487. }
  488. return mi.MessageOf(x)
  489. }
  490. // Deprecated: Use Config_HostMapping.ProtoReflect.Descriptor instead.
  491. func (*Config_HostMapping) Descriptor() ([]byte, []int) {
  492. return file_app_dns_config_proto_rawDescGZIP(), []int{1, 0}
  493. }
  494. func (x *Config_HostMapping) GetType() DomainMatchingType {
  495. if x != nil {
  496. return x.Type
  497. }
  498. return DomainMatchingType_Full
  499. }
  500. func (x *Config_HostMapping) GetDomain() string {
  501. if x != nil {
  502. return x.Domain
  503. }
  504. return ""
  505. }
  506. func (x *Config_HostMapping) GetIp() [][]byte {
  507. if x != nil {
  508. return x.Ip
  509. }
  510. return nil
  511. }
  512. func (x *Config_HostMapping) GetProxiedDomain() string {
  513. if x != nil {
  514. return x.ProxiedDomain
  515. }
  516. return ""
  517. }
  518. var File_app_dns_config_proto protoreflect.FileDescriptor
  519. const file_app_dns_config_proto_rawDesc = "" +
  520. "\n" +
  521. "\x14app/dns/config.proto\x12\fxray.app.dns\x1a\x1ccommon/net/destination.proto\x1a\x17app/router/config.proto\"\xdf\a\n" +
  522. "\n" +
  523. "NameServer\x123\n" +
  524. "\aaddress\x18\x01 \x01(\v2\x19.xray.common.net.EndpointR\aaddress\x12\x1b\n" +
  525. "\tclient_ip\x18\x05 \x01(\fR\bclientIp\x12\"\n" +
  526. "\fskipFallback\x18\x06 \x01(\bR\fskipFallback\x12V\n" +
  527. "\x12prioritized_domain\x18\x02 \x03(\v2'.xray.app.dns.NameServer.PriorityDomainR\x11prioritizedDomain\x12=\n" +
  528. "\x0eexpected_geoip\x18\x03 \x03(\v2\x16.xray.app.router.GeoIPR\rexpectedGeoip\x12L\n" +
  529. "\x0eoriginal_rules\x18\x04 \x03(\v2%.xray.app.dns.NameServer.OriginalRuleR\roriginalRules\x12B\n" +
  530. "\x0equery_strategy\x18\a \x01(\x0e2\x1b.xray.app.dns.QueryStrategyR\rqueryStrategy\x12\x1a\n" +
  531. "\bactPrior\x18\b \x01(\bR\bactPrior\x12\x10\n" +
  532. "\x03tag\x18\t \x01(\tR\x03tag\x12\x1c\n" +
  533. "\ttimeoutMs\x18\n" +
  534. " \x01(\x04R\ttimeoutMs\x12'\n" +
  535. "\fdisableCache\x18\v \x01(\bH\x00R\fdisableCache\x88\x01\x01\x12#\n" +
  536. "\n" +
  537. "serveStale\x18\x0f \x01(\bH\x01R\n" +
  538. "serveStale\x88\x01\x01\x12-\n" +
  539. "\x0fserveExpiredTTL\x18\x10 \x01(\rH\x02R\x0fserveExpiredTTL\x88\x01\x01\x12\x1e\n" +
  540. "\n" +
  541. "finalQuery\x18\f \x01(\bR\n" +
  542. "finalQuery\x12A\n" +
  543. "\x10unexpected_geoip\x18\r \x03(\v2\x16.xray.app.router.GeoIPR\x0funexpectedGeoip\x12\x1e\n" +
  544. "\n" +
  545. "actUnprior\x18\x0e \x01(\bR\n" +
  546. "actUnprior\x12\x1a\n" +
  547. "\bpolicyID\x18\x11 \x01(\rR\bpolicyID\x1a^\n" +
  548. "\x0ePriorityDomain\x124\n" +
  549. "\x04type\x18\x01 \x01(\x0e2 .xray.app.dns.DomainMatchingTypeR\x04type\x12\x16\n" +
  550. "\x06domain\x18\x02 \x01(\tR\x06domain\x1a6\n" +
  551. "\fOriginalRule\x12\x12\n" +
  552. "\x04rule\x18\x01 \x01(\tR\x04rule\x12\x12\n" +
  553. "\x04size\x18\x02 \x01(\rR\x04sizeB\x0f\n" +
  554. "\r_disableCacheB\r\n" +
  555. "\v_serveStaleB\x12\n" +
  556. "\x10_serveExpiredTTL\"\x98\x05\n" +
  557. "\x06Config\x129\n" +
  558. "\vname_server\x18\x05 \x03(\v2\x18.xray.app.dns.NameServerR\n" +
  559. "nameServer\x12\x1b\n" +
  560. "\tclient_ip\x18\x03 \x01(\fR\bclientIp\x12C\n" +
  561. "\fstatic_hosts\x18\x04 \x03(\v2 .xray.app.dns.Config.HostMappingR\vstaticHosts\x12\x10\n" +
  562. "\x03tag\x18\x06 \x01(\tR\x03tag\x12\"\n" +
  563. "\fdisableCache\x18\b \x01(\bR\fdisableCache\x12\x1e\n" +
  564. "\n" +
  565. "serveStale\x18\f \x01(\bR\n" +
  566. "serveStale\x12(\n" +
  567. "\x0fserveExpiredTTL\x18\r \x01(\rR\x0fserveExpiredTTL\x12B\n" +
  568. "\x0equery_strategy\x18\t \x01(\x0e2\x1b.xray.app.dns.QueryStrategyR\rqueryStrategy\x12(\n" +
  569. "\x0fdisableFallback\x18\n" +
  570. " \x01(\bR\x0fdisableFallback\x126\n" +
  571. "\x16disableFallbackIfMatch\x18\v \x01(\bR\x16disableFallbackIfMatch\x120\n" +
  572. "\x13enableParallelQuery\x18\x0e \x01(\bR\x13enableParallelQuery\x1a\x92\x01\n" +
  573. "\vHostMapping\x124\n" +
  574. "\x04type\x18\x01 \x01(\x0e2 .xray.app.dns.DomainMatchingTypeR\x04type\x12\x16\n" +
  575. "\x06domain\x18\x02 \x01(\tR\x06domain\x12\x0e\n" +
  576. "\x02ip\x18\x03 \x03(\fR\x02ip\x12%\n" +
  577. "\x0eproxied_domain\x18\x04 \x01(\tR\rproxiedDomainJ\x04\b\a\x10\b*E\n" +
  578. "\x12DomainMatchingType\x12\b\n" +
  579. "\x04Full\x10\x00\x12\r\n" +
  580. "\tSubdomain\x10\x01\x12\v\n" +
  581. "\aKeyword\x10\x02\x12\t\n" +
  582. "\x05Regex\x10\x03*B\n" +
  583. "\rQueryStrategy\x12\n" +
  584. "\n" +
  585. "\x06USE_IP\x10\x00\x12\v\n" +
  586. "\aUSE_IP4\x10\x01\x12\v\n" +
  587. "\aUSE_IP6\x10\x02\x12\v\n" +
  588. "\aUSE_SYS\x10\x03BF\n" +
  589. "\x10com.xray.app.dnsP\x01Z!github.com/xtls/xray-core/app/dns\xaa\x02\fXray.App.Dnsb\x06proto3"
  590. var (
  591. file_app_dns_config_proto_rawDescOnce sync.Once
  592. file_app_dns_config_proto_rawDescData []byte
  593. )
  594. func file_app_dns_config_proto_rawDescGZIP() []byte {
  595. file_app_dns_config_proto_rawDescOnce.Do(func() {
  596. file_app_dns_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_dns_config_proto_rawDesc), len(file_app_dns_config_proto_rawDesc)))
  597. })
  598. return file_app_dns_config_proto_rawDescData
  599. }
  600. var file_app_dns_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
  601. var file_app_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
  602. var file_app_dns_config_proto_goTypes = []any{
  603. (DomainMatchingType)(0), // 0: xray.app.dns.DomainMatchingType
  604. (QueryStrategy)(0), // 1: xray.app.dns.QueryStrategy
  605. (*NameServer)(nil), // 2: xray.app.dns.NameServer
  606. (*Config)(nil), // 3: xray.app.dns.Config
  607. (*NameServer_PriorityDomain)(nil), // 4: xray.app.dns.NameServer.PriorityDomain
  608. (*NameServer_OriginalRule)(nil), // 5: xray.app.dns.NameServer.OriginalRule
  609. (*Config_HostMapping)(nil), // 6: xray.app.dns.Config.HostMapping
  610. (*net.Endpoint)(nil), // 7: xray.common.net.Endpoint
  611. (*router.GeoIP)(nil), // 8: xray.app.router.GeoIP
  612. }
  613. var file_app_dns_config_proto_depIdxs = []int32{
  614. 7, // 0: xray.app.dns.NameServer.address:type_name -> xray.common.net.Endpoint
  615. 4, // 1: xray.app.dns.NameServer.prioritized_domain:type_name -> xray.app.dns.NameServer.PriorityDomain
  616. 8, // 2: xray.app.dns.NameServer.expected_geoip:type_name -> xray.app.router.GeoIP
  617. 5, // 3: xray.app.dns.NameServer.original_rules:type_name -> xray.app.dns.NameServer.OriginalRule
  618. 1, // 4: xray.app.dns.NameServer.query_strategy:type_name -> xray.app.dns.QueryStrategy
  619. 8, // 5: xray.app.dns.NameServer.unexpected_geoip:type_name -> xray.app.router.GeoIP
  620. 2, // 6: xray.app.dns.Config.name_server:type_name -> xray.app.dns.NameServer
  621. 6, // 7: xray.app.dns.Config.static_hosts:type_name -> xray.app.dns.Config.HostMapping
  622. 1, // 8: xray.app.dns.Config.query_strategy:type_name -> xray.app.dns.QueryStrategy
  623. 0, // 9: xray.app.dns.NameServer.PriorityDomain.type:type_name -> xray.app.dns.DomainMatchingType
  624. 0, // 10: xray.app.dns.Config.HostMapping.type:type_name -> xray.app.dns.DomainMatchingType
  625. 11, // [11:11] is the sub-list for method output_type
  626. 11, // [11:11] is the sub-list for method input_type
  627. 11, // [11:11] is the sub-list for extension type_name
  628. 11, // [11:11] is the sub-list for extension extendee
  629. 0, // [0:11] is the sub-list for field type_name
  630. }
  631. func init() { file_app_dns_config_proto_init() }
  632. func file_app_dns_config_proto_init() {
  633. if File_app_dns_config_proto != nil {
  634. return
  635. }
  636. file_app_dns_config_proto_msgTypes[0].OneofWrappers = []any{}
  637. type x struct{}
  638. out := protoimpl.TypeBuilder{
  639. File: protoimpl.DescBuilder{
  640. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  641. RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_dns_config_proto_rawDesc), len(file_app_dns_config_proto_rawDesc)),
  642. NumEnums: 2,
  643. NumMessages: 5,
  644. NumExtensions: 0,
  645. NumServices: 0,
  646. },
  647. GoTypes: file_app_dns_config_proto_goTypes,
  648. DependencyIndexes: file_app_dns_config_proto_depIdxs,
  649. EnumInfos: file_app_dns_config_proto_enumTypes,
  650. MessageInfos: file_app_dns_config_proto_msgTypes,
  651. }.Build()
  652. File_app_dns_config_proto = out.File
  653. file_app_dns_config_proto_goTypes = nil
  654. file_app_dns_config_proto_depIdxs = nil
  655. }