config.pb.go 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.27.1
  4. // protoc v3.18.0
  5. // source: app/router/config.proto
  6. package router
  7. import (
  8. net "github.com/xtls/xray-core/common/net"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. // Type of domain value.
  21. type Domain_Type int32
  22. const (
  23. // The value is used as is.
  24. Domain_Plain Domain_Type = 0
  25. // The value is used as a regular expression.
  26. Domain_Regex Domain_Type = 1
  27. // The value is a root domain.
  28. Domain_Domain Domain_Type = 2
  29. // The value is a domain.
  30. Domain_Full Domain_Type = 3
  31. )
  32. // Enum value maps for Domain_Type.
  33. var (
  34. Domain_Type_name = map[int32]string{
  35. 0: "Plain",
  36. 1: "Regex",
  37. 2: "Domain",
  38. 3: "Full",
  39. }
  40. Domain_Type_value = map[string]int32{
  41. "Plain": 0,
  42. "Regex": 1,
  43. "Domain": 2,
  44. "Full": 3,
  45. }
  46. )
  47. func (x Domain_Type) Enum() *Domain_Type {
  48. p := new(Domain_Type)
  49. *p = x
  50. return p
  51. }
  52. func (x Domain_Type) String() string {
  53. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  54. }
  55. func (Domain_Type) Descriptor() protoreflect.EnumDescriptor {
  56. return file_app_router_config_proto_enumTypes[0].Descriptor()
  57. }
  58. func (Domain_Type) Type() protoreflect.EnumType {
  59. return &file_app_router_config_proto_enumTypes[0]
  60. }
  61. func (x Domain_Type) Number() protoreflect.EnumNumber {
  62. return protoreflect.EnumNumber(x)
  63. }
  64. // Deprecated: Use Domain_Type.Descriptor instead.
  65. func (Domain_Type) EnumDescriptor() ([]byte, []int) {
  66. return file_app_router_config_proto_rawDescGZIP(), []int{0, 0}
  67. }
  68. type Config_DomainStrategy int32
  69. const (
  70. // Use domain as is.
  71. Config_AsIs Config_DomainStrategy = 0
  72. // Always resolve IP for domains.
  73. Config_UseIp Config_DomainStrategy = 1
  74. // Resolve to IP if the domain doesn't match any rules.
  75. Config_IpIfNonMatch Config_DomainStrategy = 2
  76. // Resolve to IP if any rule requires IP matching.
  77. Config_IpOnDemand Config_DomainStrategy = 3
  78. )
  79. // Enum value maps for Config_DomainStrategy.
  80. var (
  81. Config_DomainStrategy_name = map[int32]string{
  82. 0: "AsIs",
  83. 1: "UseIp",
  84. 2: "IpIfNonMatch",
  85. 3: "IpOnDemand",
  86. }
  87. Config_DomainStrategy_value = map[string]int32{
  88. "AsIs": 0,
  89. "UseIp": 1,
  90. "IpIfNonMatch": 2,
  91. "IpOnDemand": 3,
  92. }
  93. )
  94. func (x Config_DomainStrategy) Enum() *Config_DomainStrategy {
  95. p := new(Config_DomainStrategy)
  96. *p = x
  97. return p
  98. }
  99. func (x Config_DomainStrategy) String() string {
  100. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  101. }
  102. func (Config_DomainStrategy) Descriptor() protoreflect.EnumDescriptor {
  103. return file_app_router_config_proto_enumTypes[1].Descriptor()
  104. }
  105. func (Config_DomainStrategy) Type() protoreflect.EnumType {
  106. return &file_app_router_config_proto_enumTypes[1]
  107. }
  108. func (x Config_DomainStrategy) Number() protoreflect.EnumNumber {
  109. return protoreflect.EnumNumber(x)
  110. }
  111. // Deprecated: Use Config_DomainStrategy.Descriptor instead.
  112. func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int) {
  113. return file_app_router_config_proto_rawDescGZIP(), []int{8, 0}
  114. }
  115. // Domain for routing decision.
  116. type Domain struct {
  117. state protoimpl.MessageState
  118. sizeCache protoimpl.SizeCache
  119. unknownFields protoimpl.UnknownFields
  120. // Domain matching type.
  121. Type Domain_Type `protobuf:"varint,1,opt,name=type,proto3,enum=xray.app.router.Domain_Type" json:"type,omitempty"`
  122. // Domain value.
  123. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  124. // Attributes of this domain. May be used for filtering.
  125. Attribute []*Domain_Attribute `protobuf:"bytes,3,rep,name=attribute,proto3" json:"attribute,omitempty"`
  126. }
  127. func (x *Domain) Reset() {
  128. *x = Domain{}
  129. if protoimpl.UnsafeEnabled {
  130. mi := &file_app_router_config_proto_msgTypes[0]
  131. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  132. ms.StoreMessageInfo(mi)
  133. }
  134. }
  135. func (x *Domain) String() string {
  136. return protoimpl.X.MessageStringOf(x)
  137. }
  138. func (*Domain) ProtoMessage() {}
  139. func (x *Domain) ProtoReflect() protoreflect.Message {
  140. mi := &file_app_router_config_proto_msgTypes[0]
  141. if protoimpl.UnsafeEnabled && x != nil {
  142. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  143. if ms.LoadMessageInfo() == nil {
  144. ms.StoreMessageInfo(mi)
  145. }
  146. return ms
  147. }
  148. return mi.MessageOf(x)
  149. }
  150. // Deprecated: Use Domain.ProtoReflect.Descriptor instead.
  151. func (*Domain) Descriptor() ([]byte, []int) {
  152. return file_app_router_config_proto_rawDescGZIP(), []int{0}
  153. }
  154. func (x *Domain) GetType() Domain_Type {
  155. if x != nil {
  156. return x.Type
  157. }
  158. return Domain_Plain
  159. }
  160. func (x *Domain) GetValue() string {
  161. if x != nil {
  162. return x.Value
  163. }
  164. return ""
  165. }
  166. func (x *Domain) GetAttribute() []*Domain_Attribute {
  167. if x != nil {
  168. return x.Attribute
  169. }
  170. return nil
  171. }
  172. // IP for routing decision, in CIDR form.
  173. type CIDR struct {
  174. state protoimpl.MessageState
  175. sizeCache protoimpl.SizeCache
  176. unknownFields protoimpl.UnknownFields
  177. // IP address, should be either 4 or 16 bytes.
  178. Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
  179. // Number of leading ones in the network mask.
  180. Prefix uint32 `protobuf:"varint,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
  181. }
  182. func (x *CIDR) Reset() {
  183. *x = CIDR{}
  184. if protoimpl.UnsafeEnabled {
  185. mi := &file_app_router_config_proto_msgTypes[1]
  186. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  187. ms.StoreMessageInfo(mi)
  188. }
  189. }
  190. func (x *CIDR) String() string {
  191. return protoimpl.X.MessageStringOf(x)
  192. }
  193. func (*CIDR) ProtoMessage() {}
  194. func (x *CIDR) ProtoReflect() protoreflect.Message {
  195. mi := &file_app_router_config_proto_msgTypes[1]
  196. if protoimpl.UnsafeEnabled && x != nil {
  197. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  198. if ms.LoadMessageInfo() == nil {
  199. ms.StoreMessageInfo(mi)
  200. }
  201. return ms
  202. }
  203. return mi.MessageOf(x)
  204. }
  205. // Deprecated: Use CIDR.ProtoReflect.Descriptor instead.
  206. func (*CIDR) Descriptor() ([]byte, []int) {
  207. return file_app_router_config_proto_rawDescGZIP(), []int{1}
  208. }
  209. func (x *CIDR) GetIp() []byte {
  210. if x != nil {
  211. return x.Ip
  212. }
  213. return nil
  214. }
  215. func (x *CIDR) GetPrefix() uint32 {
  216. if x != nil {
  217. return x.Prefix
  218. }
  219. return 0
  220. }
  221. type GeoIP struct {
  222. state protoimpl.MessageState
  223. sizeCache protoimpl.SizeCache
  224. unknownFields protoimpl.UnknownFields
  225. CountryCode string `protobuf:"bytes,1,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"`
  226. Cidr []*CIDR `protobuf:"bytes,2,rep,name=cidr,proto3" json:"cidr,omitempty"`
  227. }
  228. func (x *GeoIP) Reset() {
  229. *x = GeoIP{}
  230. if protoimpl.UnsafeEnabled {
  231. mi := &file_app_router_config_proto_msgTypes[2]
  232. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  233. ms.StoreMessageInfo(mi)
  234. }
  235. }
  236. func (x *GeoIP) String() string {
  237. return protoimpl.X.MessageStringOf(x)
  238. }
  239. func (*GeoIP) ProtoMessage() {}
  240. func (x *GeoIP) ProtoReflect() protoreflect.Message {
  241. mi := &file_app_router_config_proto_msgTypes[2]
  242. if protoimpl.UnsafeEnabled && x != nil {
  243. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  244. if ms.LoadMessageInfo() == nil {
  245. ms.StoreMessageInfo(mi)
  246. }
  247. return ms
  248. }
  249. return mi.MessageOf(x)
  250. }
  251. // Deprecated: Use GeoIP.ProtoReflect.Descriptor instead.
  252. func (*GeoIP) Descriptor() ([]byte, []int) {
  253. return file_app_router_config_proto_rawDescGZIP(), []int{2}
  254. }
  255. func (x *GeoIP) GetCountryCode() string {
  256. if x != nil {
  257. return x.CountryCode
  258. }
  259. return ""
  260. }
  261. func (x *GeoIP) GetCidr() []*CIDR {
  262. if x != nil {
  263. return x.Cidr
  264. }
  265. return nil
  266. }
  267. type GeoIPList struct {
  268. state protoimpl.MessageState
  269. sizeCache protoimpl.SizeCache
  270. unknownFields protoimpl.UnknownFields
  271. Entry []*GeoIP `protobuf:"bytes,1,rep,name=entry,proto3" json:"entry,omitempty"`
  272. }
  273. func (x *GeoIPList) Reset() {
  274. *x = GeoIPList{}
  275. if protoimpl.UnsafeEnabled {
  276. mi := &file_app_router_config_proto_msgTypes[3]
  277. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  278. ms.StoreMessageInfo(mi)
  279. }
  280. }
  281. func (x *GeoIPList) String() string {
  282. return protoimpl.X.MessageStringOf(x)
  283. }
  284. func (*GeoIPList) ProtoMessage() {}
  285. func (x *GeoIPList) ProtoReflect() protoreflect.Message {
  286. mi := &file_app_router_config_proto_msgTypes[3]
  287. if protoimpl.UnsafeEnabled && x != nil {
  288. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  289. if ms.LoadMessageInfo() == nil {
  290. ms.StoreMessageInfo(mi)
  291. }
  292. return ms
  293. }
  294. return mi.MessageOf(x)
  295. }
  296. // Deprecated: Use GeoIPList.ProtoReflect.Descriptor instead.
  297. func (*GeoIPList) Descriptor() ([]byte, []int) {
  298. return file_app_router_config_proto_rawDescGZIP(), []int{3}
  299. }
  300. func (x *GeoIPList) GetEntry() []*GeoIP {
  301. if x != nil {
  302. return x.Entry
  303. }
  304. return nil
  305. }
  306. type GeoSite struct {
  307. state protoimpl.MessageState
  308. sizeCache protoimpl.SizeCache
  309. unknownFields protoimpl.UnknownFields
  310. CountryCode string `protobuf:"bytes,1,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"`
  311. Domain []*Domain `protobuf:"bytes,2,rep,name=domain,proto3" json:"domain,omitempty"`
  312. }
  313. func (x *GeoSite) Reset() {
  314. *x = GeoSite{}
  315. if protoimpl.UnsafeEnabled {
  316. mi := &file_app_router_config_proto_msgTypes[4]
  317. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  318. ms.StoreMessageInfo(mi)
  319. }
  320. }
  321. func (x *GeoSite) String() string {
  322. return protoimpl.X.MessageStringOf(x)
  323. }
  324. func (*GeoSite) ProtoMessage() {}
  325. func (x *GeoSite) ProtoReflect() protoreflect.Message {
  326. mi := &file_app_router_config_proto_msgTypes[4]
  327. if protoimpl.UnsafeEnabled && x != nil {
  328. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  329. if ms.LoadMessageInfo() == nil {
  330. ms.StoreMessageInfo(mi)
  331. }
  332. return ms
  333. }
  334. return mi.MessageOf(x)
  335. }
  336. // Deprecated: Use GeoSite.ProtoReflect.Descriptor instead.
  337. func (*GeoSite) Descriptor() ([]byte, []int) {
  338. return file_app_router_config_proto_rawDescGZIP(), []int{4}
  339. }
  340. func (x *GeoSite) GetCountryCode() string {
  341. if x != nil {
  342. return x.CountryCode
  343. }
  344. return ""
  345. }
  346. func (x *GeoSite) GetDomain() []*Domain {
  347. if x != nil {
  348. return x.Domain
  349. }
  350. return nil
  351. }
  352. type GeoSiteList struct {
  353. state protoimpl.MessageState
  354. sizeCache protoimpl.SizeCache
  355. unknownFields protoimpl.UnknownFields
  356. Entry []*GeoSite `protobuf:"bytes,1,rep,name=entry,proto3" json:"entry,omitempty"`
  357. }
  358. func (x *GeoSiteList) Reset() {
  359. *x = GeoSiteList{}
  360. if protoimpl.UnsafeEnabled {
  361. mi := &file_app_router_config_proto_msgTypes[5]
  362. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  363. ms.StoreMessageInfo(mi)
  364. }
  365. }
  366. func (x *GeoSiteList) String() string {
  367. return protoimpl.X.MessageStringOf(x)
  368. }
  369. func (*GeoSiteList) ProtoMessage() {}
  370. func (x *GeoSiteList) ProtoReflect() protoreflect.Message {
  371. mi := &file_app_router_config_proto_msgTypes[5]
  372. if protoimpl.UnsafeEnabled && x != nil {
  373. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  374. if ms.LoadMessageInfo() == nil {
  375. ms.StoreMessageInfo(mi)
  376. }
  377. return ms
  378. }
  379. return mi.MessageOf(x)
  380. }
  381. // Deprecated: Use GeoSiteList.ProtoReflect.Descriptor instead.
  382. func (*GeoSiteList) Descriptor() ([]byte, []int) {
  383. return file_app_router_config_proto_rawDescGZIP(), []int{5}
  384. }
  385. func (x *GeoSiteList) GetEntry() []*GeoSite {
  386. if x != nil {
  387. return x.Entry
  388. }
  389. return nil
  390. }
  391. type RoutingRule struct {
  392. state protoimpl.MessageState
  393. sizeCache protoimpl.SizeCache
  394. unknownFields protoimpl.UnknownFields
  395. // Types that are assignable to TargetTag:
  396. // *RoutingRule_Tag
  397. // *RoutingRule_BalancingTag
  398. TargetTag isRoutingRule_TargetTag `protobuf_oneof:"target_tag"`
  399. // List of domains for target domain matching.
  400. Domain []*Domain `protobuf:"bytes,2,rep,name=domain,proto3" json:"domain,omitempty"`
  401. // List of CIDRs for target IP address matching.
  402. // Deprecated. Use geoip below.
  403. //
  404. // Deprecated: Do not use.
  405. Cidr []*CIDR `protobuf:"bytes,3,rep,name=cidr,proto3" json:"cidr,omitempty"`
  406. // List of GeoIPs for target IP address matching. If this entry exists, the
  407. // cidr above will have no effect. GeoIP fields with the same country code are
  408. // supposed to contain exactly same content. They will be merged during
  409. // runtime. For customized GeoIPs, please leave country code empty.
  410. Geoip []*GeoIP `protobuf:"bytes,10,rep,name=geoip,proto3" json:"geoip,omitempty"`
  411. // A range of port [from, to]. If the destination port is in this range, this
  412. // rule takes effect. Deprecated. Use port_list.
  413. //
  414. // Deprecated: Do not use.
  415. PortRange *net.PortRange `protobuf:"bytes,4,opt,name=port_range,json=portRange,proto3" json:"port_range,omitempty"`
  416. // List of ports.
  417. PortList *net.PortList `protobuf:"bytes,14,opt,name=port_list,json=portList,proto3" json:"port_list,omitempty"`
  418. // List of networks. Deprecated. Use networks.
  419. //
  420. // Deprecated: Do not use.
  421. NetworkList *net.NetworkList `protobuf:"bytes,5,opt,name=network_list,json=networkList,proto3" json:"network_list,omitempty"`
  422. // List of networks for matching.
  423. Networks []net.Network `protobuf:"varint,13,rep,packed,name=networks,proto3,enum=xray.common.net.Network" json:"networks,omitempty"`
  424. // List of CIDRs for source IP address matching.
  425. //
  426. // Deprecated: Do not use.
  427. SourceCidr []*CIDR `protobuf:"bytes,6,rep,name=source_cidr,json=sourceCidr,proto3" json:"source_cidr,omitempty"`
  428. // List of GeoIPs for source IP address matching. If this entry exists, the
  429. // source_cidr above will have no effect.
  430. SourceGeoip []*GeoIP `protobuf:"bytes,11,rep,name=source_geoip,json=sourceGeoip,proto3" json:"source_geoip,omitempty"`
  431. // List of ports for source port matching.
  432. SourcePortList *net.PortList `protobuf:"bytes,16,opt,name=source_port_list,json=sourcePortList,proto3" json:"source_port_list,omitempty"`
  433. UserEmail []string `protobuf:"bytes,7,rep,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"`
  434. InboundTag []string `protobuf:"bytes,8,rep,name=inbound_tag,json=inboundTag,proto3" json:"inbound_tag,omitempty"`
  435. Protocol []string `protobuf:"bytes,9,rep,name=protocol,proto3" json:"protocol,omitempty"`
  436. Attributes string `protobuf:"bytes,15,opt,name=attributes,proto3" json:"attributes,omitempty"`
  437. DomainMatcher string `protobuf:"bytes,17,opt,name=domain_matcher,json=domainMatcher,proto3" json:"domain_matcher,omitempty"`
  438. }
  439. func (x *RoutingRule) Reset() {
  440. *x = RoutingRule{}
  441. if protoimpl.UnsafeEnabled {
  442. mi := &file_app_router_config_proto_msgTypes[6]
  443. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  444. ms.StoreMessageInfo(mi)
  445. }
  446. }
  447. func (x *RoutingRule) String() string {
  448. return protoimpl.X.MessageStringOf(x)
  449. }
  450. func (*RoutingRule) ProtoMessage() {}
  451. func (x *RoutingRule) ProtoReflect() protoreflect.Message {
  452. mi := &file_app_router_config_proto_msgTypes[6]
  453. if protoimpl.UnsafeEnabled && x != nil {
  454. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  455. if ms.LoadMessageInfo() == nil {
  456. ms.StoreMessageInfo(mi)
  457. }
  458. return ms
  459. }
  460. return mi.MessageOf(x)
  461. }
  462. // Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead.
  463. func (*RoutingRule) Descriptor() ([]byte, []int) {
  464. return file_app_router_config_proto_rawDescGZIP(), []int{6}
  465. }
  466. func (m *RoutingRule) GetTargetTag() isRoutingRule_TargetTag {
  467. if m != nil {
  468. return m.TargetTag
  469. }
  470. return nil
  471. }
  472. func (x *RoutingRule) GetTag() string {
  473. if x, ok := x.GetTargetTag().(*RoutingRule_Tag); ok {
  474. return x.Tag
  475. }
  476. return ""
  477. }
  478. func (x *RoutingRule) GetBalancingTag() string {
  479. if x, ok := x.GetTargetTag().(*RoutingRule_BalancingTag); ok {
  480. return x.BalancingTag
  481. }
  482. return ""
  483. }
  484. func (x *RoutingRule) GetDomain() []*Domain {
  485. if x != nil {
  486. return x.Domain
  487. }
  488. return nil
  489. }
  490. // Deprecated: Do not use.
  491. func (x *RoutingRule) GetCidr() []*CIDR {
  492. if x != nil {
  493. return x.Cidr
  494. }
  495. return nil
  496. }
  497. func (x *RoutingRule) GetGeoip() []*GeoIP {
  498. if x != nil {
  499. return x.Geoip
  500. }
  501. return nil
  502. }
  503. // Deprecated: Do not use.
  504. func (x *RoutingRule) GetPortRange() *net.PortRange {
  505. if x != nil {
  506. return x.PortRange
  507. }
  508. return nil
  509. }
  510. func (x *RoutingRule) GetPortList() *net.PortList {
  511. if x != nil {
  512. return x.PortList
  513. }
  514. return nil
  515. }
  516. // Deprecated: Do not use.
  517. func (x *RoutingRule) GetNetworkList() *net.NetworkList {
  518. if x != nil {
  519. return x.NetworkList
  520. }
  521. return nil
  522. }
  523. func (x *RoutingRule) GetNetworks() []net.Network {
  524. if x != nil {
  525. return x.Networks
  526. }
  527. return nil
  528. }
  529. // Deprecated: Do not use.
  530. func (x *RoutingRule) GetSourceCidr() []*CIDR {
  531. if x != nil {
  532. return x.SourceCidr
  533. }
  534. return nil
  535. }
  536. func (x *RoutingRule) GetSourceGeoip() []*GeoIP {
  537. if x != nil {
  538. return x.SourceGeoip
  539. }
  540. return nil
  541. }
  542. func (x *RoutingRule) GetSourcePortList() *net.PortList {
  543. if x != nil {
  544. return x.SourcePortList
  545. }
  546. return nil
  547. }
  548. func (x *RoutingRule) GetUserEmail() []string {
  549. if x != nil {
  550. return x.UserEmail
  551. }
  552. return nil
  553. }
  554. func (x *RoutingRule) GetInboundTag() []string {
  555. if x != nil {
  556. return x.InboundTag
  557. }
  558. return nil
  559. }
  560. func (x *RoutingRule) GetProtocol() []string {
  561. if x != nil {
  562. return x.Protocol
  563. }
  564. return nil
  565. }
  566. func (x *RoutingRule) GetAttributes() string {
  567. if x != nil {
  568. return x.Attributes
  569. }
  570. return ""
  571. }
  572. func (x *RoutingRule) GetDomainMatcher() string {
  573. if x != nil {
  574. return x.DomainMatcher
  575. }
  576. return ""
  577. }
  578. type isRoutingRule_TargetTag interface {
  579. isRoutingRule_TargetTag()
  580. }
  581. type RoutingRule_Tag struct {
  582. // Tag of outbound that this rule is pointing to.
  583. Tag string `protobuf:"bytes,1,opt,name=tag,proto3,oneof"`
  584. }
  585. type RoutingRule_BalancingTag struct {
  586. // Tag of routing balancer.
  587. BalancingTag string `protobuf:"bytes,12,opt,name=balancing_tag,json=balancingTag,proto3,oneof"`
  588. }
  589. func (*RoutingRule_Tag) isRoutingRule_TargetTag() {}
  590. func (*RoutingRule_BalancingTag) isRoutingRule_TargetTag() {}
  591. type BalancingRule struct {
  592. state protoimpl.MessageState
  593. sizeCache protoimpl.SizeCache
  594. unknownFields protoimpl.UnknownFields
  595. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  596. OutboundSelector []string `protobuf:"bytes,2,rep,name=outbound_selector,json=outboundSelector,proto3" json:"outbound_selector,omitempty"`
  597. }
  598. func (x *BalancingRule) Reset() {
  599. *x = BalancingRule{}
  600. if protoimpl.UnsafeEnabled {
  601. mi := &file_app_router_config_proto_msgTypes[7]
  602. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  603. ms.StoreMessageInfo(mi)
  604. }
  605. }
  606. func (x *BalancingRule) String() string {
  607. return protoimpl.X.MessageStringOf(x)
  608. }
  609. func (*BalancingRule) ProtoMessage() {}
  610. func (x *BalancingRule) ProtoReflect() protoreflect.Message {
  611. mi := &file_app_router_config_proto_msgTypes[7]
  612. if protoimpl.UnsafeEnabled && x != nil {
  613. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  614. if ms.LoadMessageInfo() == nil {
  615. ms.StoreMessageInfo(mi)
  616. }
  617. return ms
  618. }
  619. return mi.MessageOf(x)
  620. }
  621. // Deprecated: Use BalancingRule.ProtoReflect.Descriptor instead.
  622. func (*BalancingRule) Descriptor() ([]byte, []int) {
  623. return file_app_router_config_proto_rawDescGZIP(), []int{7}
  624. }
  625. func (x *BalancingRule) GetTag() string {
  626. if x != nil {
  627. return x.Tag
  628. }
  629. return ""
  630. }
  631. func (x *BalancingRule) GetOutboundSelector() []string {
  632. if x != nil {
  633. return x.OutboundSelector
  634. }
  635. return nil
  636. }
  637. type Config struct {
  638. state protoimpl.MessageState
  639. sizeCache protoimpl.SizeCache
  640. unknownFields protoimpl.UnknownFields
  641. DomainStrategy Config_DomainStrategy `protobuf:"varint,1,opt,name=domain_strategy,json=domainStrategy,proto3,enum=xray.app.router.Config_DomainStrategy" json:"domain_strategy,omitempty"`
  642. Rule []*RoutingRule `protobuf:"bytes,2,rep,name=rule,proto3" json:"rule,omitempty"`
  643. BalancingRule []*BalancingRule `protobuf:"bytes,3,rep,name=balancing_rule,json=balancingRule,proto3" json:"balancing_rule,omitempty"`
  644. }
  645. func (x *Config) Reset() {
  646. *x = Config{}
  647. if protoimpl.UnsafeEnabled {
  648. mi := &file_app_router_config_proto_msgTypes[8]
  649. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  650. ms.StoreMessageInfo(mi)
  651. }
  652. }
  653. func (x *Config) String() string {
  654. return protoimpl.X.MessageStringOf(x)
  655. }
  656. func (*Config) ProtoMessage() {}
  657. func (x *Config) ProtoReflect() protoreflect.Message {
  658. mi := &file_app_router_config_proto_msgTypes[8]
  659. if protoimpl.UnsafeEnabled && x != nil {
  660. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  661. if ms.LoadMessageInfo() == nil {
  662. ms.StoreMessageInfo(mi)
  663. }
  664. return ms
  665. }
  666. return mi.MessageOf(x)
  667. }
  668. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  669. func (*Config) Descriptor() ([]byte, []int) {
  670. return file_app_router_config_proto_rawDescGZIP(), []int{8}
  671. }
  672. func (x *Config) GetDomainStrategy() Config_DomainStrategy {
  673. if x != nil {
  674. return x.DomainStrategy
  675. }
  676. return Config_AsIs
  677. }
  678. func (x *Config) GetRule() []*RoutingRule {
  679. if x != nil {
  680. return x.Rule
  681. }
  682. return nil
  683. }
  684. func (x *Config) GetBalancingRule() []*BalancingRule {
  685. if x != nil {
  686. return x.BalancingRule
  687. }
  688. return nil
  689. }
  690. type Domain_Attribute struct {
  691. state protoimpl.MessageState
  692. sizeCache protoimpl.SizeCache
  693. unknownFields protoimpl.UnknownFields
  694. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  695. // Types that are assignable to TypedValue:
  696. // *Domain_Attribute_BoolValue
  697. // *Domain_Attribute_IntValue
  698. TypedValue isDomain_Attribute_TypedValue `protobuf_oneof:"typed_value"`
  699. }
  700. func (x *Domain_Attribute) Reset() {
  701. *x = Domain_Attribute{}
  702. if protoimpl.UnsafeEnabled {
  703. mi := &file_app_router_config_proto_msgTypes[9]
  704. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  705. ms.StoreMessageInfo(mi)
  706. }
  707. }
  708. func (x *Domain_Attribute) String() string {
  709. return protoimpl.X.MessageStringOf(x)
  710. }
  711. func (*Domain_Attribute) ProtoMessage() {}
  712. func (x *Domain_Attribute) ProtoReflect() protoreflect.Message {
  713. mi := &file_app_router_config_proto_msgTypes[9]
  714. if protoimpl.UnsafeEnabled && x != nil {
  715. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  716. if ms.LoadMessageInfo() == nil {
  717. ms.StoreMessageInfo(mi)
  718. }
  719. return ms
  720. }
  721. return mi.MessageOf(x)
  722. }
  723. // Deprecated: Use Domain_Attribute.ProtoReflect.Descriptor instead.
  724. func (*Domain_Attribute) Descriptor() ([]byte, []int) {
  725. return file_app_router_config_proto_rawDescGZIP(), []int{0, 0}
  726. }
  727. func (x *Domain_Attribute) GetKey() string {
  728. if x != nil {
  729. return x.Key
  730. }
  731. return ""
  732. }
  733. func (m *Domain_Attribute) GetTypedValue() isDomain_Attribute_TypedValue {
  734. if m != nil {
  735. return m.TypedValue
  736. }
  737. return nil
  738. }
  739. func (x *Domain_Attribute) GetBoolValue() bool {
  740. if x, ok := x.GetTypedValue().(*Domain_Attribute_BoolValue); ok {
  741. return x.BoolValue
  742. }
  743. return false
  744. }
  745. func (x *Domain_Attribute) GetIntValue() int64 {
  746. if x, ok := x.GetTypedValue().(*Domain_Attribute_IntValue); ok {
  747. return x.IntValue
  748. }
  749. return 0
  750. }
  751. type isDomain_Attribute_TypedValue interface {
  752. isDomain_Attribute_TypedValue()
  753. }
  754. type Domain_Attribute_BoolValue struct {
  755. BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"`
  756. }
  757. type Domain_Attribute_IntValue struct {
  758. IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"`
  759. }
  760. func (*Domain_Attribute_BoolValue) isDomain_Attribute_TypedValue() {}
  761. func (*Domain_Attribute_IntValue) isDomain_Attribute_TypedValue() {}
  762. var File_app_router_config_proto protoreflect.FileDescriptor
  763. var file_app_router_config_proto_rawDesc = []byte{
  764. 0x0a, 0x17, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e,
  765. 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x78, 0x72, 0x61, 0x79, 0x2e,
  766. 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x1a, 0x15, 0x63, 0x6f, 0x6d, 0x6d,
  767. 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
  768. 0x6f, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65,
  769. 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x02, 0x0a, 0x06,
  770. 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
  771. 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e,
  772. 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x79,
  773. 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
  774. 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f,
  775. 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28,
  776. 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75,
  777. 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69,
  778. 0x62, 0x75, 0x74, 0x65, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x1a,
  779. 0x6c, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03,
  780. 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f,
  781. 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
  782. 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
  783. 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01,
  784. 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0d,
  785. 0x0a, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x32, 0x0a,
  786. 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x10, 0x00,
  787. 0x12, 0x09, 0x0a, 0x05, 0x52, 0x65, 0x67, 0x65, 0x78, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44,
  788. 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x75, 0x6c, 0x6c, 0x10,
  789. 0x03, 0x22, 0x2e, 0x0a, 0x04, 0x43, 0x49, 0x44, 0x52, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18,
  790. 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65,
  791. 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69,
  792. 0x78, 0x22, 0x55, 0x0a, 0x05, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f,
  793. 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
  794. 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a,
  795. 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x78, 0x72,
  796. 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x49,
  797. 0x44, 0x52, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x22, 0x39, 0x0a, 0x09, 0x47, 0x65, 0x6f, 0x49,
  798. 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01,
  799. 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e,
  800. 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, 0x05, 0x65, 0x6e,
  801. 0x74, 0x72, 0x79, 0x22, 0x5d, 0x0a, 0x07, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, 0x65, 0x12, 0x21,
  802. 0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
  803. 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64,
  804. 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28,
  805. 0x0b, 0x32, 0x17, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75,
  806. 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61,
  807. 0x69, 0x6e, 0x22, 0x3d, 0x0a, 0x0b, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x73,
  808. 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
  809. 0x32, 0x18, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74,
  810. 0x65, 0x72, 0x2e, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, 0x65, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72,
  811. 0x79, 0x22, 0xb5, 0x06, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c,
  812. 0x65, 0x12, 0x12, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
  813. 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x25, 0x0a, 0x0d, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69,
  814. 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c,
  815. 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x12, 0x2f, 0x0a, 0x06,
  816. 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x78,
  817. 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x44,
  818. 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x2d, 0x0a,
  819. 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x78, 0x72,
  820. 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x49,
  821. 0x44, 0x52, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, 0x2c, 0x0a, 0x05,
  822. 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x78, 0x72,
  823. 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65,
  824. 0x6f, 0x49, 0x50, 0x52, 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x6f,
  825. 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
  826. 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74,
  827. 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09,
  828. 0x70, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x6f, 0x72,
  829. 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x78,
  830. 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50,
  831. 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x08, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73,
  832. 0x74, 0x12, 0x43, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x69, 0x73,
  833. 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63,
  834. 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
  835. 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f,
  836. 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
  837. 0x6b, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e,
  838. 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f,
  839. 0x72, 0x6b, 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0x3a, 0x0a, 0x0b,
  840. 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28,
  841. 0x0b, 0x32, 0x15, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75,
  842. 0x74, 0x65, 0x72, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x6f,
  843. 0x75, 0x72, 0x63, 0x65, 0x43, 0x69, 0x64, 0x72, 0x12, 0x39, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72,
  844. 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16,
  845. 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
  846. 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65,
  847. 0x6f, 0x69, 0x70, 0x12, 0x43, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f,
  848. 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
  849. 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e,
  850. 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
  851. 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72,
  852. 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73,
  853. 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x75,
  854. 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e,
  855. 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74,
  856. 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74,
  857. 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
  858. 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
  859. 0x75, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d,
  860. 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x6f,
  861. 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x74,
  862. 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x22, 0x4e, 0x0a, 0x0d, 0x42, 0x61, 0x6c,
  863. 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61,
  864. 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x2b, 0x0a, 0x11,
  865. 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f,
  866. 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e,
  867. 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x9b, 0x02, 0x0a, 0x06, 0x43, 0x6f,
  868. 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73,
  869. 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e,
  870. 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e,
  871. 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72,
  872. 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72,
  873. 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x30, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20,
  874. 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72,
  875. 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c,
  876. 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e,
  877. 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
  878. 0x1e, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65,
  879. 0x72, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52,
  880. 0x0d, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x47,
  881. 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79,
  882. 0x12, 0x08, 0x0a, 0x04, 0x41, 0x73, 0x49, 0x73, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x73,
  883. 0x65, 0x49, 0x70, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x70, 0x49, 0x66, 0x4e, 0x6f, 0x6e,
  884. 0x4d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x70, 0x4f, 0x6e, 0x44,
  885. 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x10, 0x03, 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78,
  886. 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x01,
  887. 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c,
  888. 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f,
  889. 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0xaa, 0x02, 0x0f, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x41, 0x70,
  890. 0x70, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  891. }
  892. var (
  893. file_app_router_config_proto_rawDescOnce sync.Once
  894. file_app_router_config_proto_rawDescData = file_app_router_config_proto_rawDesc
  895. )
  896. func file_app_router_config_proto_rawDescGZIP() []byte {
  897. file_app_router_config_proto_rawDescOnce.Do(func() {
  898. file_app_router_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_router_config_proto_rawDescData)
  899. })
  900. return file_app_router_config_proto_rawDescData
  901. }
  902. var file_app_router_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
  903. var file_app_router_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
  904. var file_app_router_config_proto_goTypes = []interface{}{
  905. (Domain_Type)(0), // 0: xray.app.router.Domain.Type
  906. (Config_DomainStrategy)(0), // 1: xray.app.router.Config.DomainStrategy
  907. (*Domain)(nil), // 2: xray.app.router.Domain
  908. (*CIDR)(nil), // 3: xray.app.router.CIDR
  909. (*GeoIP)(nil), // 4: xray.app.router.GeoIP
  910. (*GeoIPList)(nil), // 5: xray.app.router.GeoIPList
  911. (*GeoSite)(nil), // 6: xray.app.router.GeoSite
  912. (*GeoSiteList)(nil), // 7: xray.app.router.GeoSiteList
  913. (*RoutingRule)(nil), // 8: xray.app.router.RoutingRule
  914. (*BalancingRule)(nil), // 9: xray.app.router.BalancingRule
  915. (*Config)(nil), // 10: xray.app.router.Config
  916. (*Domain_Attribute)(nil), // 11: xray.app.router.Domain.Attribute
  917. (*net.PortRange)(nil), // 12: xray.common.net.PortRange
  918. (*net.PortList)(nil), // 13: xray.common.net.PortList
  919. (*net.NetworkList)(nil), // 14: xray.common.net.NetworkList
  920. (net.Network)(0), // 15: xray.common.net.Network
  921. }
  922. var file_app_router_config_proto_depIdxs = []int32{
  923. 0, // 0: xray.app.router.Domain.type:type_name -> xray.app.router.Domain.Type
  924. 11, // 1: xray.app.router.Domain.attribute:type_name -> xray.app.router.Domain.Attribute
  925. 3, // 2: xray.app.router.GeoIP.cidr:type_name -> xray.app.router.CIDR
  926. 4, // 3: xray.app.router.GeoIPList.entry:type_name -> xray.app.router.GeoIP
  927. 2, // 4: xray.app.router.GeoSite.domain:type_name -> xray.app.router.Domain
  928. 6, // 5: xray.app.router.GeoSiteList.entry:type_name -> xray.app.router.GeoSite
  929. 2, // 6: xray.app.router.RoutingRule.domain:type_name -> xray.app.router.Domain
  930. 3, // 7: xray.app.router.RoutingRule.cidr:type_name -> xray.app.router.CIDR
  931. 4, // 8: xray.app.router.RoutingRule.geoip:type_name -> xray.app.router.GeoIP
  932. 12, // 9: xray.app.router.RoutingRule.port_range:type_name -> xray.common.net.PortRange
  933. 13, // 10: xray.app.router.RoutingRule.port_list:type_name -> xray.common.net.PortList
  934. 14, // 11: xray.app.router.RoutingRule.network_list:type_name -> xray.common.net.NetworkList
  935. 15, // 12: xray.app.router.RoutingRule.networks:type_name -> xray.common.net.Network
  936. 3, // 13: xray.app.router.RoutingRule.source_cidr:type_name -> xray.app.router.CIDR
  937. 4, // 14: xray.app.router.RoutingRule.source_geoip:type_name -> xray.app.router.GeoIP
  938. 13, // 15: xray.app.router.RoutingRule.source_port_list:type_name -> xray.common.net.PortList
  939. 1, // 16: xray.app.router.Config.domain_strategy:type_name -> xray.app.router.Config.DomainStrategy
  940. 8, // 17: xray.app.router.Config.rule:type_name -> xray.app.router.RoutingRule
  941. 9, // 18: xray.app.router.Config.balancing_rule:type_name -> xray.app.router.BalancingRule
  942. 19, // [19:19] is the sub-list for method output_type
  943. 19, // [19:19] is the sub-list for method input_type
  944. 19, // [19:19] is the sub-list for extension type_name
  945. 19, // [19:19] is the sub-list for extension extendee
  946. 0, // [0:19] is the sub-list for field type_name
  947. }
  948. func init() { file_app_router_config_proto_init() }
  949. func file_app_router_config_proto_init() {
  950. if File_app_router_config_proto != nil {
  951. return
  952. }
  953. if !protoimpl.UnsafeEnabled {
  954. file_app_router_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  955. switch v := v.(*Domain); i {
  956. case 0:
  957. return &v.state
  958. case 1:
  959. return &v.sizeCache
  960. case 2:
  961. return &v.unknownFields
  962. default:
  963. return nil
  964. }
  965. }
  966. file_app_router_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  967. switch v := v.(*CIDR); i {
  968. case 0:
  969. return &v.state
  970. case 1:
  971. return &v.sizeCache
  972. case 2:
  973. return &v.unknownFields
  974. default:
  975. return nil
  976. }
  977. }
  978. file_app_router_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  979. switch v := v.(*GeoIP); i {
  980. case 0:
  981. return &v.state
  982. case 1:
  983. return &v.sizeCache
  984. case 2:
  985. return &v.unknownFields
  986. default:
  987. return nil
  988. }
  989. }
  990. file_app_router_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  991. switch v := v.(*GeoIPList); i {
  992. case 0:
  993. return &v.state
  994. case 1:
  995. return &v.sizeCache
  996. case 2:
  997. return &v.unknownFields
  998. default:
  999. return nil
  1000. }
  1001. }
  1002. file_app_router_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  1003. switch v := v.(*GeoSite); i {
  1004. case 0:
  1005. return &v.state
  1006. case 1:
  1007. return &v.sizeCache
  1008. case 2:
  1009. return &v.unknownFields
  1010. default:
  1011. return nil
  1012. }
  1013. }
  1014. file_app_router_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
  1015. switch v := v.(*GeoSiteList); i {
  1016. case 0:
  1017. return &v.state
  1018. case 1:
  1019. return &v.sizeCache
  1020. case 2:
  1021. return &v.unknownFields
  1022. default:
  1023. return nil
  1024. }
  1025. }
  1026. file_app_router_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
  1027. switch v := v.(*RoutingRule); i {
  1028. case 0:
  1029. return &v.state
  1030. case 1:
  1031. return &v.sizeCache
  1032. case 2:
  1033. return &v.unknownFields
  1034. default:
  1035. return nil
  1036. }
  1037. }
  1038. file_app_router_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
  1039. switch v := v.(*BalancingRule); i {
  1040. case 0:
  1041. return &v.state
  1042. case 1:
  1043. return &v.sizeCache
  1044. case 2:
  1045. return &v.unknownFields
  1046. default:
  1047. return nil
  1048. }
  1049. }
  1050. file_app_router_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
  1051. switch v := v.(*Config); i {
  1052. case 0:
  1053. return &v.state
  1054. case 1:
  1055. return &v.sizeCache
  1056. case 2:
  1057. return &v.unknownFields
  1058. default:
  1059. return nil
  1060. }
  1061. }
  1062. file_app_router_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
  1063. switch v := v.(*Domain_Attribute); i {
  1064. case 0:
  1065. return &v.state
  1066. case 1:
  1067. return &v.sizeCache
  1068. case 2:
  1069. return &v.unknownFields
  1070. default:
  1071. return nil
  1072. }
  1073. }
  1074. }
  1075. file_app_router_config_proto_msgTypes[6].OneofWrappers = []interface{}{
  1076. (*RoutingRule_Tag)(nil),
  1077. (*RoutingRule_BalancingTag)(nil),
  1078. }
  1079. file_app_router_config_proto_msgTypes[9].OneofWrappers = []interface{}{
  1080. (*Domain_Attribute_BoolValue)(nil),
  1081. (*Domain_Attribute_IntValue)(nil),
  1082. }
  1083. type x struct{}
  1084. out := protoimpl.TypeBuilder{
  1085. File: protoimpl.DescBuilder{
  1086. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  1087. RawDescriptor: file_app_router_config_proto_rawDesc,
  1088. NumEnums: 2,
  1089. NumMessages: 10,
  1090. NumExtensions: 0,
  1091. NumServices: 0,
  1092. },
  1093. GoTypes: file_app_router_config_proto_goTypes,
  1094. DependencyIndexes: file_app_router_config_proto_depIdxs,
  1095. EnumInfos: file_app_router_config_proto_enumTypes,
  1096. MessageInfos: file_app_router_config_proto_msgTypes,
  1097. }.Build()
  1098. File_app_router_config_proto = out.File
  1099. file_app_router_config_proto_rawDesc = nil
  1100. file_app_router_config_proto_goTypes = nil
  1101. file_app_router_config_proto_depIdxs = nil
  1102. }