config.pb.go 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  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/router/config.proto
  6. package router
  7. import (
  8. net "github.com/xtls/xray-core/common/net"
  9. serial "github.com/xtls/xray-core/common/serial"
  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 of domain value.
  23. type Domain_Type int32
  24. const (
  25. // The value is used as is.
  26. Domain_Plain Domain_Type = 0
  27. // The value is used as a regular expression.
  28. Domain_Regex Domain_Type = 1
  29. // The value is a root domain.
  30. Domain_Domain Domain_Type = 2
  31. // The value is a domain.
  32. Domain_Full Domain_Type = 3
  33. )
  34. // Enum value maps for Domain_Type.
  35. var (
  36. Domain_Type_name = map[int32]string{
  37. 0: "Plain",
  38. 1: "Regex",
  39. 2: "Domain",
  40. 3: "Full",
  41. }
  42. Domain_Type_value = map[string]int32{
  43. "Plain": 0,
  44. "Regex": 1,
  45. "Domain": 2,
  46. "Full": 3,
  47. }
  48. )
  49. func (x Domain_Type) Enum() *Domain_Type {
  50. p := new(Domain_Type)
  51. *p = x
  52. return p
  53. }
  54. func (x Domain_Type) String() string {
  55. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  56. }
  57. func (Domain_Type) Descriptor() protoreflect.EnumDescriptor {
  58. return file_app_router_config_proto_enumTypes[0].Descriptor()
  59. }
  60. func (Domain_Type) Type() protoreflect.EnumType {
  61. return &file_app_router_config_proto_enumTypes[0]
  62. }
  63. func (x Domain_Type) Number() protoreflect.EnumNumber {
  64. return protoreflect.EnumNumber(x)
  65. }
  66. // Deprecated: Use Domain_Type.Descriptor instead.
  67. func (Domain_Type) EnumDescriptor() ([]byte, []int) {
  68. return file_app_router_config_proto_rawDescGZIP(), []int{0, 0}
  69. }
  70. type Config_DomainStrategy int32
  71. const (
  72. // Use domain as is.
  73. Config_AsIs Config_DomainStrategy = 0
  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. 2: "IpIfNonMatch",
  84. 3: "IpOnDemand",
  85. }
  86. Config_DomainStrategy_value = map[string]int32{
  87. "AsIs": 0,
  88. "IpIfNonMatch": 2,
  89. "IpOnDemand": 3,
  90. }
  91. )
  92. func (x Config_DomainStrategy) Enum() *Config_DomainStrategy {
  93. p := new(Config_DomainStrategy)
  94. *p = x
  95. return p
  96. }
  97. func (x Config_DomainStrategy) String() string {
  98. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  99. }
  100. func (Config_DomainStrategy) Descriptor() protoreflect.EnumDescriptor {
  101. return file_app_router_config_proto_enumTypes[1].Descriptor()
  102. }
  103. func (Config_DomainStrategy) Type() protoreflect.EnumType {
  104. return &file_app_router_config_proto_enumTypes[1]
  105. }
  106. func (x Config_DomainStrategy) Number() protoreflect.EnumNumber {
  107. return protoreflect.EnumNumber(x)
  108. }
  109. // Deprecated: Use Config_DomainStrategy.Descriptor instead.
  110. func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int) {
  111. return file_app_router_config_proto_rawDescGZIP(), []int{10, 0}
  112. }
  113. // Domain for routing decision.
  114. type Domain struct {
  115. state protoimpl.MessageState `protogen:"open.v1"`
  116. // Domain matching type.
  117. Type Domain_Type `protobuf:"varint,1,opt,name=type,proto3,enum=xray.app.router.Domain_Type" json:"type,omitempty"`
  118. // Domain value.
  119. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  120. // Attributes of this domain. May be used for filtering.
  121. Attribute []*Domain_Attribute `protobuf:"bytes,3,rep,name=attribute,proto3" json:"attribute,omitempty"`
  122. unknownFields protoimpl.UnknownFields
  123. sizeCache protoimpl.SizeCache
  124. }
  125. func (x *Domain) Reset() {
  126. *x = Domain{}
  127. mi := &file_app_router_config_proto_msgTypes[0]
  128. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  129. ms.StoreMessageInfo(mi)
  130. }
  131. func (x *Domain) String() string {
  132. return protoimpl.X.MessageStringOf(x)
  133. }
  134. func (*Domain) ProtoMessage() {}
  135. func (x *Domain) ProtoReflect() protoreflect.Message {
  136. mi := &file_app_router_config_proto_msgTypes[0]
  137. if x != nil {
  138. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  139. if ms.LoadMessageInfo() == nil {
  140. ms.StoreMessageInfo(mi)
  141. }
  142. return ms
  143. }
  144. return mi.MessageOf(x)
  145. }
  146. // Deprecated: Use Domain.ProtoReflect.Descriptor instead.
  147. func (*Domain) Descriptor() ([]byte, []int) {
  148. return file_app_router_config_proto_rawDescGZIP(), []int{0}
  149. }
  150. func (x *Domain) GetType() Domain_Type {
  151. if x != nil {
  152. return x.Type
  153. }
  154. return Domain_Plain
  155. }
  156. func (x *Domain) GetValue() string {
  157. if x != nil {
  158. return x.Value
  159. }
  160. return ""
  161. }
  162. func (x *Domain) GetAttribute() []*Domain_Attribute {
  163. if x != nil {
  164. return x.Attribute
  165. }
  166. return nil
  167. }
  168. // IP for routing decision, in CIDR form.
  169. type CIDR struct {
  170. state protoimpl.MessageState `protogen:"open.v1"`
  171. // IP address, should be either 4 or 16 bytes.
  172. Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
  173. // Number of leading ones in the network mask.
  174. Prefix uint32 `protobuf:"varint,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
  175. unknownFields protoimpl.UnknownFields
  176. sizeCache protoimpl.SizeCache
  177. }
  178. func (x *CIDR) Reset() {
  179. *x = CIDR{}
  180. mi := &file_app_router_config_proto_msgTypes[1]
  181. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  182. ms.StoreMessageInfo(mi)
  183. }
  184. func (x *CIDR) String() string {
  185. return protoimpl.X.MessageStringOf(x)
  186. }
  187. func (*CIDR) ProtoMessage() {}
  188. func (x *CIDR) ProtoReflect() protoreflect.Message {
  189. mi := &file_app_router_config_proto_msgTypes[1]
  190. if x != nil {
  191. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  192. if ms.LoadMessageInfo() == nil {
  193. ms.StoreMessageInfo(mi)
  194. }
  195. return ms
  196. }
  197. return mi.MessageOf(x)
  198. }
  199. // Deprecated: Use CIDR.ProtoReflect.Descriptor instead.
  200. func (*CIDR) Descriptor() ([]byte, []int) {
  201. return file_app_router_config_proto_rawDescGZIP(), []int{1}
  202. }
  203. func (x *CIDR) GetIp() []byte {
  204. if x != nil {
  205. return x.Ip
  206. }
  207. return nil
  208. }
  209. func (x *CIDR) GetPrefix() uint32 {
  210. if x != nil {
  211. return x.Prefix
  212. }
  213. return 0
  214. }
  215. type GeoIP struct {
  216. state protoimpl.MessageState `protogen:"open.v1"`
  217. CountryCode string `protobuf:"bytes,1,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"`
  218. Cidr []*CIDR `protobuf:"bytes,2,rep,name=cidr,proto3" json:"cidr,omitempty"`
  219. ReverseMatch bool `protobuf:"varint,3,opt,name=reverse_match,json=reverseMatch,proto3" json:"reverse_match,omitempty"`
  220. unknownFields protoimpl.UnknownFields
  221. sizeCache protoimpl.SizeCache
  222. }
  223. func (x *GeoIP) Reset() {
  224. *x = GeoIP{}
  225. mi := &file_app_router_config_proto_msgTypes[2]
  226. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  227. ms.StoreMessageInfo(mi)
  228. }
  229. func (x *GeoIP) String() string {
  230. return protoimpl.X.MessageStringOf(x)
  231. }
  232. func (*GeoIP) ProtoMessage() {}
  233. func (x *GeoIP) ProtoReflect() protoreflect.Message {
  234. mi := &file_app_router_config_proto_msgTypes[2]
  235. if x != nil {
  236. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  237. if ms.LoadMessageInfo() == nil {
  238. ms.StoreMessageInfo(mi)
  239. }
  240. return ms
  241. }
  242. return mi.MessageOf(x)
  243. }
  244. // Deprecated: Use GeoIP.ProtoReflect.Descriptor instead.
  245. func (*GeoIP) Descriptor() ([]byte, []int) {
  246. return file_app_router_config_proto_rawDescGZIP(), []int{2}
  247. }
  248. func (x *GeoIP) GetCountryCode() string {
  249. if x != nil {
  250. return x.CountryCode
  251. }
  252. return ""
  253. }
  254. func (x *GeoIP) GetCidr() []*CIDR {
  255. if x != nil {
  256. return x.Cidr
  257. }
  258. return nil
  259. }
  260. func (x *GeoIP) GetReverseMatch() bool {
  261. if x != nil {
  262. return x.ReverseMatch
  263. }
  264. return false
  265. }
  266. type GeoIPList struct {
  267. state protoimpl.MessageState `protogen:"open.v1"`
  268. Entry []*GeoIP `protobuf:"bytes,1,rep,name=entry,proto3" json:"entry,omitempty"`
  269. unknownFields protoimpl.UnknownFields
  270. sizeCache protoimpl.SizeCache
  271. }
  272. func (x *GeoIPList) Reset() {
  273. *x = GeoIPList{}
  274. mi := &file_app_router_config_proto_msgTypes[3]
  275. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  276. ms.StoreMessageInfo(mi)
  277. }
  278. func (x *GeoIPList) String() string {
  279. return protoimpl.X.MessageStringOf(x)
  280. }
  281. func (*GeoIPList) ProtoMessage() {}
  282. func (x *GeoIPList) ProtoReflect() protoreflect.Message {
  283. mi := &file_app_router_config_proto_msgTypes[3]
  284. if x != nil {
  285. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  286. if ms.LoadMessageInfo() == nil {
  287. ms.StoreMessageInfo(mi)
  288. }
  289. return ms
  290. }
  291. return mi.MessageOf(x)
  292. }
  293. // Deprecated: Use GeoIPList.ProtoReflect.Descriptor instead.
  294. func (*GeoIPList) Descriptor() ([]byte, []int) {
  295. return file_app_router_config_proto_rawDescGZIP(), []int{3}
  296. }
  297. func (x *GeoIPList) GetEntry() []*GeoIP {
  298. if x != nil {
  299. return x.Entry
  300. }
  301. return nil
  302. }
  303. type GeoSite struct {
  304. state protoimpl.MessageState `protogen:"open.v1"`
  305. CountryCode string `protobuf:"bytes,1,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"`
  306. Domain []*Domain `protobuf:"bytes,2,rep,name=domain,proto3" json:"domain,omitempty"`
  307. unknownFields protoimpl.UnknownFields
  308. sizeCache protoimpl.SizeCache
  309. }
  310. func (x *GeoSite) Reset() {
  311. *x = GeoSite{}
  312. mi := &file_app_router_config_proto_msgTypes[4]
  313. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  314. ms.StoreMessageInfo(mi)
  315. }
  316. func (x *GeoSite) String() string {
  317. return protoimpl.X.MessageStringOf(x)
  318. }
  319. func (*GeoSite) ProtoMessage() {}
  320. func (x *GeoSite) ProtoReflect() protoreflect.Message {
  321. mi := &file_app_router_config_proto_msgTypes[4]
  322. if x != nil {
  323. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  324. if ms.LoadMessageInfo() == nil {
  325. ms.StoreMessageInfo(mi)
  326. }
  327. return ms
  328. }
  329. return mi.MessageOf(x)
  330. }
  331. // Deprecated: Use GeoSite.ProtoReflect.Descriptor instead.
  332. func (*GeoSite) Descriptor() ([]byte, []int) {
  333. return file_app_router_config_proto_rawDescGZIP(), []int{4}
  334. }
  335. func (x *GeoSite) GetCountryCode() string {
  336. if x != nil {
  337. return x.CountryCode
  338. }
  339. return ""
  340. }
  341. func (x *GeoSite) GetDomain() []*Domain {
  342. if x != nil {
  343. return x.Domain
  344. }
  345. return nil
  346. }
  347. type GeoSiteList struct {
  348. state protoimpl.MessageState `protogen:"open.v1"`
  349. Entry []*GeoSite `protobuf:"bytes,1,rep,name=entry,proto3" json:"entry,omitempty"`
  350. unknownFields protoimpl.UnknownFields
  351. sizeCache protoimpl.SizeCache
  352. }
  353. func (x *GeoSiteList) Reset() {
  354. *x = GeoSiteList{}
  355. mi := &file_app_router_config_proto_msgTypes[5]
  356. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  357. ms.StoreMessageInfo(mi)
  358. }
  359. func (x *GeoSiteList) String() string {
  360. return protoimpl.X.MessageStringOf(x)
  361. }
  362. func (*GeoSiteList) ProtoMessage() {}
  363. func (x *GeoSiteList) ProtoReflect() protoreflect.Message {
  364. mi := &file_app_router_config_proto_msgTypes[5]
  365. if x != nil {
  366. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  367. if ms.LoadMessageInfo() == nil {
  368. ms.StoreMessageInfo(mi)
  369. }
  370. return ms
  371. }
  372. return mi.MessageOf(x)
  373. }
  374. // Deprecated: Use GeoSiteList.ProtoReflect.Descriptor instead.
  375. func (*GeoSiteList) Descriptor() ([]byte, []int) {
  376. return file_app_router_config_proto_rawDescGZIP(), []int{5}
  377. }
  378. func (x *GeoSiteList) GetEntry() []*GeoSite {
  379. if x != nil {
  380. return x.Entry
  381. }
  382. return nil
  383. }
  384. type RoutingRule struct {
  385. state protoimpl.MessageState `protogen:"open.v1"`
  386. // Types that are valid to be assigned to TargetTag:
  387. //
  388. // *RoutingRule_Tag
  389. // *RoutingRule_BalancingTag
  390. TargetTag isRoutingRule_TargetTag `protobuf_oneof:"target_tag"`
  391. RuleTag string `protobuf:"bytes,19,opt,name=rule_tag,json=ruleTag,proto3" json:"rule_tag,omitempty"`
  392. // List of domains for target domain matching.
  393. Domain []*Domain `protobuf:"bytes,2,rep,name=domain,proto3" json:"domain,omitempty"`
  394. // List of GeoIPs for target IP address matching. If this entry exists, the
  395. // cidr above will have no effect. GeoIP fields with the same country code are
  396. // supposed to contain exactly same content. They will be merged during
  397. // runtime. For customized GeoIPs, please leave country code empty.
  398. Geoip []*GeoIP `protobuf:"bytes,10,rep,name=geoip,proto3" json:"geoip,omitempty"`
  399. // List of ports.
  400. PortList *net.PortList `protobuf:"bytes,14,opt,name=port_list,json=portList,proto3" json:"port_list,omitempty"`
  401. // List of networks for matching.
  402. Networks []net.Network `protobuf:"varint,13,rep,packed,name=networks,proto3,enum=xray.common.net.Network" json:"networks,omitempty"`
  403. // List of GeoIPs for source IP address matching. If this entry exists, the
  404. // source_cidr above will have no effect.
  405. SourceGeoip []*GeoIP `protobuf:"bytes,11,rep,name=source_geoip,json=sourceGeoip,proto3" json:"source_geoip,omitempty"`
  406. // List of ports for source port matching.
  407. SourcePortList *net.PortList `protobuf:"bytes,16,opt,name=source_port_list,json=sourcePortList,proto3" json:"source_port_list,omitempty"`
  408. UserEmail []string `protobuf:"bytes,7,rep,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"`
  409. InboundTag []string `protobuf:"bytes,8,rep,name=inbound_tag,json=inboundTag,proto3" json:"inbound_tag,omitempty"`
  410. Protocol []string `protobuf:"bytes,9,rep,name=protocol,proto3" json:"protocol,omitempty"`
  411. Attributes map[string]string `protobuf:"bytes,15,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  412. LocalGeoip []*GeoIP `protobuf:"bytes,17,rep,name=local_geoip,json=localGeoip,proto3" json:"local_geoip,omitempty"`
  413. LocalPortList *net.PortList `protobuf:"bytes,18,opt,name=local_port_list,json=localPortList,proto3" json:"local_port_list,omitempty"`
  414. VlessRouteList *net.PortList `protobuf:"bytes,20,opt,name=vless_route_list,json=vlessRouteList,proto3" json:"vless_route_list,omitempty"`
  415. Process []string `protobuf:"bytes,21,rep,name=process,proto3" json:"process,omitempty"`
  416. unknownFields protoimpl.UnknownFields
  417. sizeCache protoimpl.SizeCache
  418. }
  419. func (x *RoutingRule) Reset() {
  420. *x = RoutingRule{}
  421. mi := &file_app_router_config_proto_msgTypes[6]
  422. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  423. ms.StoreMessageInfo(mi)
  424. }
  425. func (x *RoutingRule) String() string {
  426. return protoimpl.X.MessageStringOf(x)
  427. }
  428. func (*RoutingRule) ProtoMessage() {}
  429. func (x *RoutingRule) ProtoReflect() protoreflect.Message {
  430. mi := &file_app_router_config_proto_msgTypes[6]
  431. if x != nil {
  432. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  433. if ms.LoadMessageInfo() == nil {
  434. ms.StoreMessageInfo(mi)
  435. }
  436. return ms
  437. }
  438. return mi.MessageOf(x)
  439. }
  440. // Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead.
  441. func (*RoutingRule) Descriptor() ([]byte, []int) {
  442. return file_app_router_config_proto_rawDescGZIP(), []int{6}
  443. }
  444. func (x *RoutingRule) GetTargetTag() isRoutingRule_TargetTag {
  445. if x != nil {
  446. return x.TargetTag
  447. }
  448. return nil
  449. }
  450. func (x *RoutingRule) GetTag() string {
  451. if x != nil {
  452. if x, ok := x.TargetTag.(*RoutingRule_Tag); ok {
  453. return x.Tag
  454. }
  455. }
  456. return ""
  457. }
  458. func (x *RoutingRule) GetBalancingTag() string {
  459. if x != nil {
  460. if x, ok := x.TargetTag.(*RoutingRule_BalancingTag); ok {
  461. return x.BalancingTag
  462. }
  463. }
  464. return ""
  465. }
  466. func (x *RoutingRule) GetRuleTag() string {
  467. if x != nil {
  468. return x.RuleTag
  469. }
  470. return ""
  471. }
  472. func (x *RoutingRule) GetDomain() []*Domain {
  473. if x != nil {
  474. return x.Domain
  475. }
  476. return nil
  477. }
  478. func (x *RoutingRule) GetGeoip() []*GeoIP {
  479. if x != nil {
  480. return x.Geoip
  481. }
  482. return nil
  483. }
  484. func (x *RoutingRule) GetPortList() *net.PortList {
  485. if x != nil {
  486. return x.PortList
  487. }
  488. return nil
  489. }
  490. func (x *RoutingRule) GetNetworks() []net.Network {
  491. if x != nil {
  492. return x.Networks
  493. }
  494. return nil
  495. }
  496. func (x *RoutingRule) GetSourceGeoip() []*GeoIP {
  497. if x != nil {
  498. return x.SourceGeoip
  499. }
  500. return nil
  501. }
  502. func (x *RoutingRule) GetSourcePortList() *net.PortList {
  503. if x != nil {
  504. return x.SourcePortList
  505. }
  506. return nil
  507. }
  508. func (x *RoutingRule) GetUserEmail() []string {
  509. if x != nil {
  510. return x.UserEmail
  511. }
  512. return nil
  513. }
  514. func (x *RoutingRule) GetInboundTag() []string {
  515. if x != nil {
  516. return x.InboundTag
  517. }
  518. return nil
  519. }
  520. func (x *RoutingRule) GetProtocol() []string {
  521. if x != nil {
  522. return x.Protocol
  523. }
  524. return nil
  525. }
  526. func (x *RoutingRule) GetAttributes() map[string]string {
  527. if x != nil {
  528. return x.Attributes
  529. }
  530. return nil
  531. }
  532. func (x *RoutingRule) GetLocalGeoip() []*GeoIP {
  533. if x != nil {
  534. return x.LocalGeoip
  535. }
  536. return nil
  537. }
  538. func (x *RoutingRule) GetLocalPortList() *net.PortList {
  539. if x != nil {
  540. return x.LocalPortList
  541. }
  542. return nil
  543. }
  544. func (x *RoutingRule) GetVlessRouteList() *net.PortList {
  545. if x != nil {
  546. return x.VlessRouteList
  547. }
  548. return nil
  549. }
  550. func (x *RoutingRule) GetProcess() []string {
  551. if x != nil {
  552. return x.Process
  553. }
  554. return nil
  555. }
  556. type isRoutingRule_TargetTag interface {
  557. isRoutingRule_TargetTag()
  558. }
  559. type RoutingRule_Tag struct {
  560. // Tag of outbound that this rule is pointing to.
  561. Tag string `protobuf:"bytes,1,opt,name=tag,proto3,oneof"`
  562. }
  563. type RoutingRule_BalancingTag struct {
  564. // Tag of routing balancer.
  565. BalancingTag string `protobuf:"bytes,12,opt,name=balancing_tag,json=balancingTag,proto3,oneof"`
  566. }
  567. func (*RoutingRule_Tag) isRoutingRule_TargetTag() {}
  568. func (*RoutingRule_BalancingTag) isRoutingRule_TargetTag() {}
  569. type BalancingRule struct {
  570. state protoimpl.MessageState `protogen:"open.v1"`
  571. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  572. OutboundSelector []string `protobuf:"bytes,2,rep,name=outbound_selector,json=outboundSelector,proto3" json:"outbound_selector,omitempty"`
  573. Strategy string `protobuf:"bytes,3,opt,name=strategy,proto3" json:"strategy,omitempty"`
  574. StrategySettings *serial.TypedMessage `protobuf:"bytes,4,opt,name=strategy_settings,json=strategySettings,proto3" json:"strategy_settings,omitempty"`
  575. FallbackTag string `protobuf:"bytes,5,opt,name=fallback_tag,json=fallbackTag,proto3" json:"fallback_tag,omitempty"`
  576. unknownFields protoimpl.UnknownFields
  577. sizeCache protoimpl.SizeCache
  578. }
  579. func (x *BalancingRule) Reset() {
  580. *x = BalancingRule{}
  581. mi := &file_app_router_config_proto_msgTypes[7]
  582. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  583. ms.StoreMessageInfo(mi)
  584. }
  585. func (x *BalancingRule) String() string {
  586. return protoimpl.X.MessageStringOf(x)
  587. }
  588. func (*BalancingRule) ProtoMessage() {}
  589. func (x *BalancingRule) ProtoReflect() protoreflect.Message {
  590. mi := &file_app_router_config_proto_msgTypes[7]
  591. if x != nil {
  592. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  593. if ms.LoadMessageInfo() == nil {
  594. ms.StoreMessageInfo(mi)
  595. }
  596. return ms
  597. }
  598. return mi.MessageOf(x)
  599. }
  600. // Deprecated: Use BalancingRule.ProtoReflect.Descriptor instead.
  601. func (*BalancingRule) Descriptor() ([]byte, []int) {
  602. return file_app_router_config_proto_rawDescGZIP(), []int{7}
  603. }
  604. func (x *BalancingRule) GetTag() string {
  605. if x != nil {
  606. return x.Tag
  607. }
  608. return ""
  609. }
  610. func (x *BalancingRule) GetOutboundSelector() []string {
  611. if x != nil {
  612. return x.OutboundSelector
  613. }
  614. return nil
  615. }
  616. func (x *BalancingRule) GetStrategy() string {
  617. if x != nil {
  618. return x.Strategy
  619. }
  620. return ""
  621. }
  622. func (x *BalancingRule) GetStrategySettings() *serial.TypedMessage {
  623. if x != nil {
  624. return x.StrategySettings
  625. }
  626. return nil
  627. }
  628. func (x *BalancingRule) GetFallbackTag() string {
  629. if x != nil {
  630. return x.FallbackTag
  631. }
  632. return ""
  633. }
  634. type StrategyWeight struct {
  635. state protoimpl.MessageState `protogen:"open.v1"`
  636. Regexp bool `protobuf:"varint,1,opt,name=regexp,proto3" json:"regexp,omitempty"`
  637. Match string `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"`
  638. Value float32 `protobuf:"fixed32,3,opt,name=value,proto3" json:"value,omitempty"`
  639. unknownFields protoimpl.UnknownFields
  640. sizeCache protoimpl.SizeCache
  641. }
  642. func (x *StrategyWeight) Reset() {
  643. *x = StrategyWeight{}
  644. mi := &file_app_router_config_proto_msgTypes[8]
  645. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  646. ms.StoreMessageInfo(mi)
  647. }
  648. func (x *StrategyWeight) String() string {
  649. return protoimpl.X.MessageStringOf(x)
  650. }
  651. func (*StrategyWeight) ProtoMessage() {}
  652. func (x *StrategyWeight) ProtoReflect() protoreflect.Message {
  653. mi := &file_app_router_config_proto_msgTypes[8]
  654. if x != nil {
  655. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  656. if ms.LoadMessageInfo() == nil {
  657. ms.StoreMessageInfo(mi)
  658. }
  659. return ms
  660. }
  661. return mi.MessageOf(x)
  662. }
  663. // Deprecated: Use StrategyWeight.ProtoReflect.Descriptor instead.
  664. func (*StrategyWeight) Descriptor() ([]byte, []int) {
  665. return file_app_router_config_proto_rawDescGZIP(), []int{8}
  666. }
  667. func (x *StrategyWeight) GetRegexp() bool {
  668. if x != nil {
  669. return x.Regexp
  670. }
  671. return false
  672. }
  673. func (x *StrategyWeight) GetMatch() string {
  674. if x != nil {
  675. return x.Match
  676. }
  677. return ""
  678. }
  679. func (x *StrategyWeight) GetValue() float32 {
  680. if x != nil {
  681. return x.Value
  682. }
  683. return 0
  684. }
  685. type StrategyLeastLoadConfig struct {
  686. state protoimpl.MessageState `protogen:"open.v1"`
  687. // weight settings
  688. Costs []*StrategyWeight `protobuf:"bytes,2,rep,name=costs,proto3" json:"costs,omitempty"`
  689. // RTT baselines for selecting, int64 values of time.Duration
  690. Baselines []int64 `protobuf:"varint,3,rep,packed,name=baselines,proto3" json:"baselines,omitempty"`
  691. // expected nodes count to select
  692. Expected int32 `protobuf:"varint,4,opt,name=expected,proto3" json:"expected,omitempty"`
  693. // max acceptable rtt, filter away high delay nodes. default 0
  694. MaxRTT int64 `protobuf:"varint,5,opt,name=maxRTT,proto3" json:"maxRTT,omitempty"`
  695. // acceptable failure rate
  696. Tolerance float32 `protobuf:"fixed32,6,opt,name=tolerance,proto3" json:"tolerance,omitempty"`
  697. unknownFields protoimpl.UnknownFields
  698. sizeCache protoimpl.SizeCache
  699. }
  700. func (x *StrategyLeastLoadConfig) Reset() {
  701. *x = StrategyLeastLoadConfig{}
  702. mi := &file_app_router_config_proto_msgTypes[9]
  703. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  704. ms.StoreMessageInfo(mi)
  705. }
  706. func (x *StrategyLeastLoadConfig) String() string {
  707. return protoimpl.X.MessageStringOf(x)
  708. }
  709. func (*StrategyLeastLoadConfig) ProtoMessage() {}
  710. func (x *StrategyLeastLoadConfig) ProtoReflect() protoreflect.Message {
  711. mi := &file_app_router_config_proto_msgTypes[9]
  712. if x != nil {
  713. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  714. if ms.LoadMessageInfo() == nil {
  715. ms.StoreMessageInfo(mi)
  716. }
  717. return ms
  718. }
  719. return mi.MessageOf(x)
  720. }
  721. // Deprecated: Use StrategyLeastLoadConfig.ProtoReflect.Descriptor instead.
  722. func (*StrategyLeastLoadConfig) Descriptor() ([]byte, []int) {
  723. return file_app_router_config_proto_rawDescGZIP(), []int{9}
  724. }
  725. func (x *StrategyLeastLoadConfig) GetCosts() []*StrategyWeight {
  726. if x != nil {
  727. return x.Costs
  728. }
  729. return nil
  730. }
  731. func (x *StrategyLeastLoadConfig) GetBaselines() []int64 {
  732. if x != nil {
  733. return x.Baselines
  734. }
  735. return nil
  736. }
  737. func (x *StrategyLeastLoadConfig) GetExpected() int32 {
  738. if x != nil {
  739. return x.Expected
  740. }
  741. return 0
  742. }
  743. func (x *StrategyLeastLoadConfig) GetMaxRTT() int64 {
  744. if x != nil {
  745. return x.MaxRTT
  746. }
  747. return 0
  748. }
  749. func (x *StrategyLeastLoadConfig) GetTolerance() float32 {
  750. if x != nil {
  751. return x.Tolerance
  752. }
  753. return 0
  754. }
  755. type Config struct {
  756. state protoimpl.MessageState `protogen:"open.v1"`
  757. DomainStrategy Config_DomainStrategy `protobuf:"varint,1,opt,name=domain_strategy,json=domainStrategy,proto3,enum=xray.app.router.Config_DomainStrategy" json:"domain_strategy,omitempty"`
  758. Rule []*RoutingRule `protobuf:"bytes,2,rep,name=rule,proto3" json:"rule,omitempty"`
  759. BalancingRule []*BalancingRule `protobuf:"bytes,3,rep,name=balancing_rule,json=balancingRule,proto3" json:"balancing_rule,omitempty"`
  760. unknownFields protoimpl.UnknownFields
  761. sizeCache protoimpl.SizeCache
  762. }
  763. func (x *Config) Reset() {
  764. *x = Config{}
  765. mi := &file_app_router_config_proto_msgTypes[10]
  766. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  767. ms.StoreMessageInfo(mi)
  768. }
  769. func (x *Config) String() string {
  770. return protoimpl.X.MessageStringOf(x)
  771. }
  772. func (*Config) ProtoMessage() {}
  773. func (x *Config) ProtoReflect() protoreflect.Message {
  774. mi := &file_app_router_config_proto_msgTypes[10]
  775. if x != nil {
  776. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  777. if ms.LoadMessageInfo() == nil {
  778. ms.StoreMessageInfo(mi)
  779. }
  780. return ms
  781. }
  782. return mi.MessageOf(x)
  783. }
  784. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  785. func (*Config) Descriptor() ([]byte, []int) {
  786. return file_app_router_config_proto_rawDescGZIP(), []int{10}
  787. }
  788. func (x *Config) GetDomainStrategy() Config_DomainStrategy {
  789. if x != nil {
  790. return x.DomainStrategy
  791. }
  792. return Config_AsIs
  793. }
  794. func (x *Config) GetRule() []*RoutingRule {
  795. if x != nil {
  796. return x.Rule
  797. }
  798. return nil
  799. }
  800. func (x *Config) GetBalancingRule() []*BalancingRule {
  801. if x != nil {
  802. return x.BalancingRule
  803. }
  804. return nil
  805. }
  806. type Domain_Attribute struct {
  807. state protoimpl.MessageState `protogen:"open.v1"`
  808. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  809. // Types that are valid to be assigned to TypedValue:
  810. //
  811. // *Domain_Attribute_BoolValue
  812. // *Domain_Attribute_IntValue
  813. TypedValue isDomain_Attribute_TypedValue `protobuf_oneof:"typed_value"`
  814. unknownFields protoimpl.UnknownFields
  815. sizeCache protoimpl.SizeCache
  816. }
  817. func (x *Domain_Attribute) Reset() {
  818. *x = Domain_Attribute{}
  819. mi := &file_app_router_config_proto_msgTypes[11]
  820. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  821. ms.StoreMessageInfo(mi)
  822. }
  823. func (x *Domain_Attribute) String() string {
  824. return protoimpl.X.MessageStringOf(x)
  825. }
  826. func (*Domain_Attribute) ProtoMessage() {}
  827. func (x *Domain_Attribute) ProtoReflect() protoreflect.Message {
  828. mi := &file_app_router_config_proto_msgTypes[11]
  829. if x != nil {
  830. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  831. if ms.LoadMessageInfo() == nil {
  832. ms.StoreMessageInfo(mi)
  833. }
  834. return ms
  835. }
  836. return mi.MessageOf(x)
  837. }
  838. // Deprecated: Use Domain_Attribute.ProtoReflect.Descriptor instead.
  839. func (*Domain_Attribute) Descriptor() ([]byte, []int) {
  840. return file_app_router_config_proto_rawDescGZIP(), []int{0, 0}
  841. }
  842. func (x *Domain_Attribute) GetKey() string {
  843. if x != nil {
  844. return x.Key
  845. }
  846. return ""
  847. }
  848. func (x *Domain_Attribute) GetTypedValue() isDomain_Attribute_TypedValue {
  849. if x != nil {
  850. return x.TypedValue
  851. }
  852. return nil
  853. }
  854. func (x *Domain_Attribute) GetBoolValue() bool {
  855. if x != nil {
  856. if x, ok := x.TypedValue.(*Domain_Attribute_BoolValue); ok {
  857. return x.BoolValue
  858. }
  859. }
  860. return false
  861. }
  862. func (x *Domain_Attribute) GetIntValue() int64 {
  863. if x != nil {
  864. if x, ok := x.TypedValue.(*Domain_Attribute_IntValue); ok {
  865. return x.IntValue
  866. }
  867. }
  868. return 0
  869. }
  870. type isDomain_Attribute_TypedValue interface {
  871. isDomain_Attribute_TypedValue()
  872. }
  873. type Domain_Attribute_BoolValue struct {
  874. BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"`
  875. }
  876. type Domain_Attribute_IntValue struct {
  877. IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"`
  878. }
  879. func (*Domain_Attribute_BoolValue) isDomain_Attribute_TypedValue() {}
  880. func (*Domain_Attribute_IntValue) isDomain_Attribute_TypedValue() {}
  881. var File_app_router_config_proto protoreflect.FileDescriptor
  882. const file_app_router_config_proto_rawDesc = "" +
  883. "\n" +
  884. "\x17app/router/config.proto\x12\x0fxray.app.router\x1a!common/serial/typed_message.proto\x1a\x15common/net/port.proto\x1a\x18common/net/network.proto\"\xb3\x02\n" +
  885. "\x06Domain\x120\n" +
  886. "\x04type\x18\x01 \x01(\x0e2\x1c.xray.app.router.Domain.TypeR\x04type\x12\x14\n" +
  887. "\x05value\x18\x02 \x01(\tR\x05value\x12?\n" +
  888. "\tattribute\x18\x03 \x03(\v2!.xray.app.router.Domain.AttributeR\tattribute\x1al\n" +
  889. "\tAttribute\x12\x10\n" +
  890. "\x03key\x18\x01 \x01(\tR\x03key\x12\x1f\n" +
  891. "\n" +
  892. "bool_value\x18\x02 \x01(\bH\x00R\tboolValue\x12\x1d\n" +
  893. "\tint_value\x18\x03 \x01(\x03H\x00R\bintValueB\r\n" +
  894. "\vtyped_value\"2\n" +
  895. "\x04Type\x12\t\n" +
  896. "\x05Plain\x10\x00\x12\t\n" +
  897. "\x05Regex\x10\x01\x12\n" +
  898. "\n" +
  899. "\x06Domain\x10\x02\x12\b\n" +
  900. "\x04Full\x10\x03\".\n" +
  901. "\x04CIDR\x12\x0e\n" +
  902. "\x02ip\x18\x01 \x01(\fR\x02ip\x12\x16\n" +
  903. "\x06prefix\x18\x02 \x01(\rR\x06prefix\"z\n" +
  904. "\x05GeoIP\x12!\n" +
  905. "\fcountry_code\x18\x01 \x01(\tR\vcountryCode\x12)\n" +
  906. "\x04cidr\x18\x02 \x03(\v2\x15.xray.app.router.CIDRR\x04cidr\x12#\n" +
  907. "\rreverse_match\x18\x03 \x01(\bR\freverseMatch\"9\n" +
  908. "\tGeoIPList\x12,\n" +
  909. "\x05entry\x18\x01 \x03(\v2\x16.xray.app.router.GeoIPR\x05entry\"]\n" +
  910. "\aGeoSite\x12!\n" +
  911. "\fcountry_code\x18\x01 \x01(\tR\vcountryCode\x12/\n" +
  912. "\x06domain\x18\x02 \x03(\v2\x17.xray.app.router.DomainR\x06domain\"=\n" +
  913. "\vGeoSiteList\x12.\n" +
  914. "\x05entry\x18\x01 \x03(\v2\x18.xray.app.router.GeoSiteR\x05entry\"\x82\a\n" +
  915. "\vRoutingRule\x12\x12\n" +
  916. "\x03tag\x18\x01 \x01(\tH\x00R\x03tag\x12%\n" +
  917. "\rbalancing_tag\x18\f \x01(\tH\x00R\fbalancingTag\x12\x19\n" +
  918. "\brule_tag\x18\x13 \x01(\tR\aruleTag\x12/\n" +
  919. "\x06domain\x18\x02 \x03(\v2\x17.xray.app.router.DomainR\x06domain\x12,\n" +
  920. "\x05geoip\x18\n" +
  921. " \x03(\v2\x16.xray.app.router.GeoIPR\x05geoip\x126\n" +
  922. "\tport_list\x18\x0e \x01(\v2\x19.xray.common.net.PortListR\bportList\x124\n" +
  923. "\bnetworks\x18\r \x03(\x0e2\x18.xray.common.net.NetworkR\bnetworks\x129\n" +
  924. "\fsource_geoip\x18\v \x03(\v2\x16.xray.app.router.GeoIPR\vsourceGeoip\x12C\n" +
  925. "\x10source_port_list\x18\x10 \x01(\v2\x19.xray.common.net.PortListR\x0esourcePortList\x12\x1d\n" +
  926. "\n" +
  927. "user_email\x18\a \x03(\tR\tuserEmail\x12\x1f\n" +
  928. "\vinbound_tag\x18\b \x03(\tR\n" +
  929. "inboundTag\x12\x1a\n" +
  930. "\bprotocol\x18\t \x03(\tR\bprotocol\x12L\n" +
  931. "\n" +
  932. "attributes\x18\x0f \x03(\v2,.xray.app.router.RoutingRule.AttributesEntryR\n" +
  933. "attributes\x127\n" +
  934. "\vlocal_geoip\x18\x11 \x03(\v2\x16.xray.app.router.GeoIPR\n" +
  935. "localGeoip\x12A\n" +
  936. "\x0flocal_port_list\x18\x12 \x01(\v2\x19.xray.common.net.PortListR\rlocalPortList\x12C\n" +
  937. "\x10vless_route_list\x18\x14 \x01(\v2\x19.xray.common.net.PortListR\x0evlessRouteList\x12\x18\n" +
  938. "\aprocess\x18\x15 \x03(\tR\aprocess\x1a=\n" +
  939. "\x0fAttributesEntry\x12\x10\n" +
  940. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  941. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\f\n" +
  942. "\n" +
  943. "target_tag\"\xdc\x01\n" +
  944. "\rBalancingRule\x12\x10\n" +
  945. "\x03tag\x18\x01 \x01(\tR\x03tag\x12+\n" +
  946. "\x11outbound_selector\x18\x02 \x03(\tR\x10outboundSelector\x12\x1a\n" +
  947. "\bstrategy\x18\x03 \x01(\tR\bstrategy\x12M\n" +
  948. "\x11strategy_settings\x18\x04 \x01(\v2 .xray.common.serial.TypedMessageR\x10strategySettings\x12!\n" +
  949. "\ffallback_tag\x18\x05 \x01(\tR\vfallbackTag\"T\n" +
  950. "\x0eStrategyWeight\x12\x16\n" +
  951. "\x06regexp\x18\x01 \x01(\bR\x06regexp\x12\x14\n" +
  952. "\x05match\x18\x02 \x01(\tR\x05match\x12\x14\n" +
  953. "\x05value\x18\x03 \x01(\x02R\x05value\"\xc0\x01\n" +
  954. "\x17StrategyLeastLoadConfig\x125\n" +
  955. "\x05costs\x18\x02 \x03(\v2\x1f.xray.app.router.StrategyWeightR\x05costs\x12\x1c\n" +
  956. "\tbaselines\x18\x03 \x03(\x03R\tbaselines\x12\x1a\n" +
  957. "\bexpected\x18\x04 \x01(\x05R\bexpected\x12\x16\n" +
  958. "\x06maxRTT\x18\x05 \x01(\x03R\x06maxRTT\x12\x1c\n" +
  959. "\ttolerance\x18\x06 \x01(\x02R\ttolerance\"\x90\x02\n" +
  960. "\x06Config\x12O\n" +
  961. "\x0fdomain_strategy\x18\x01 \x01(\x0e2&.xray.app.router.Config.DomainStrategyR\x0edomainStrategy\x120\n" +
  962. "\x04rule\x18\x02 \x03(\v2\x1c.xray.app.router.RoutingRuleR\x04rule\x12E\n" +
  963. "\x0ebalancing_rule\x18\x03 \x03(\v2\x1e.xray.app.router.BalancingRuleR\rbalancingRule\"<\n" +
  964. "\x0eDomainStrategy\x12\b\n" +
  965. "\x04AsIs\x10\x00\x12\x10\n" +
  966. "\fIpIfNonMatch\x10\x02\x12\x0e\n" +
  967. "\n" +
  968. "IpOnDemand\x10\x03BO\n" +
  969. "\x13com.xray.app.routerP\x01Z$github.com/xtls/xray-core/app/router\xaa\x02\x0fXray.App.Routerb\x06proto3"
  970. var (
  971. file_app_router_config_proto_rawDescOnce sync.Once
  972. file_app_router_config_proto_rawDescData []byte
  973. )
  974. func file_app_router_config_proto_rawDescGZIP() []byte {
  975. file_app_router_config_proto_rawDescOnce.Do(func() {
  976. file_app_router_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_router_config_proto_rawDesc), len(file_app_router_config_proto_rawDesc)))
  977. })
  978. return file_app_router_config_proto_rawDescData
  979. }
  980. var file_app_router_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
  981. var file_app_router_config_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
  982. var file_app_router_config_proto_goTypes = []any{
  983. (Domain_Type)(0), // 0: xray.app.router.Domain.Type
  984. (Config_DomainStrategy)(0), // 1: xray.app.router.Config.DomainStrategy
  985. (*Domain)(nil), // 2: xray.app.router.Domain
  986. (*CIDR)(nil), // 3: xray.app.router.CIDR
  987. (*GeoIP)(nil), // 4: xray.app.router.GeoIP
  988. (*GeoIPList)(nil), // 5: xray.app.router.GeoIPList
  989. (*GeoSite)(nil), // 6: xray.app.router.GeoSite
  990. (*GeoSiteList)(nil), // 7: xray.app.router.GeoSiteList
  991. (*RoutingRule)(nil), // 8: xray.app.router.RoutingRule
  992. (*BalancingRule)(nil), // 9: xray.app.router.BalancingRule
  993. (*StrategyWeight)(nil), // 10: xray.app.router.StrategyWeight
  994. (*StrategyLeastLoadConfig)(nil), // 11: xray.app.router.StrategyLeastLoadConfig
  995. (*Config)(nil), // 12: xray.app.router.Config
  996. (*Domain_Attribute)(nil), // 13: xray.app.router.Domain.Attribute
  997. nil, // 14: xray.app.router.RoutingRule.AttributesEntry
  998. (*net.PortList)(nil), // 15: xray.common.net.PortList
  999. (net.Network)(0), // 16: xray.common.net.Network
  1000. (*serial.TypedMessage)(nil), // 17: xray.common.serial.TypedMessage
  1001. }
  1002. var file_app_router_config_proto_depIdxs = []int32{
  1003. 0, // 0: xray.app.router.Domain.type:type_name -> xray.app.router.Domain.Type
  1004. 13, // 1: xray.app.router.Domain.attribute:type_name -> xray.app.router.Domain.Attribute
  1005. 3, // 2: xray.app.router.GeoIP.cidr:type_name -> xray.app.router.CIDR
  1006. 4, // 3: xray.app.router.GeoIPList.entry:type_name -> xray.app.router.GeoIP
  1007. 2, // 4: xray.app.router.GeoSite.domain:type_name -> xray.app.router.Domain
  1008. 6, // 5: xray.app.router.GeoSiteList.entry:type_name -> xray.app.router.GeoSite
  1009. 2, // 6: xray.app.router.RoutingRule.domain:type_name -> xray.app.router.Domain
  1010. 4, // 7: xray.app.router.RoutingRule.geoip:type_name -> xray.app.router.GeoIP
  1011. 15, // 8: xray.app.router.RoutingRule.port_list:type_name -> xray.common.net.PortList
  1012. 16, // 9: xray.app.router.RoutingRule.networks:type_name -> xray.common.net.Network
  1013. 4, // 10: xray.app.router.RoutingRule.source_geoip:type_name -> xray.app.router.GeoIP
  1014. 15, // 11: xray.app.router.RoutingRule.source_port_list:type_name -> xray.common.net.PortList
  1015. 14, // 12: xray.app.router.RoutingRule.attributes:type_name -> xray.app.router.RoutingRule.AttributesEntry
  1016. 4, // 13: xray.app.router.RoutingRule.local_geoip:type_name -> xray.app.router.GeoIP
  1017. 15, // 14: xray.app.router.RoutingRule.local_port_list:type_name -> xray.common.net.PortList
  1018. 15, // 15: xray.app.router.RoutingRule.vless_route_list:type_name -> xray.common.net.PortList
  1019. 17, // 16: xray.app.router.BalancingRule.strategy_settings:type_name -> xray.common.serial.TypedMessage
  1020. 10, // 17: xray.app.router.StrategyLeastLoadConfig.costs:type_name -> xray.app.router.StrategyWeight
  1021. 1, // 18: xray.app.router.Config.domain_strategy:type_name -> xray.app.router.Config.DomainStrategy
  1022. 8, // 19: xray.app.router.Config.rule:type_name -> xray.app.router.RoutingRule
  1023. 9, // 20: xray.app.router.Config.balancing_rule:type_name -> xray.app.router.BalancingRule
  1024. 21, // [21:21] is the sub-list for method output_type
  1025. 21, // [21:21] is the sub-list for method input_type
  1026. 21, // [21:21] is the sub-list for extension type_name
  1027. 21, // [21:21] is the sub-list for extension extendee
  1028. 0, // [0:21] is the sub-list for field type_name
  1029. }
  1030. func init() { file_app_router_config_proto_init() }
  1031. func file_app_router_config_proto_init() {
  1032. if File_app_router_config_proto != nil {
  1033. return
  1034. }
  1035. file_app_router_config_proto_msgTypes[6].OneofWrappers = []any{
  1036. (*RoutingRule_Tag)(nil),
  1037. (*RoutingRule_BalancingTag)(nil),
  1038. }
  1039. file_app_router_config_proto_msgTypes[11].OneofWrappers = []any{
  1040. (*Domain_Attribute_BoolValue)(nil),
  1041. (*Domain_Attribute_IntValue)(nil),
  1042. }
  1043. type x struct{}
  1044. out := protoimpl.TypeBuilder{
  1045. File: protoimpl.DescBuilder{
  1046. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  1047. RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_router_config_proto_rawDesc), len(file_app_router_config_proto_rawDesc)),
  1048. NumEnums: 2,
  1049. NumMessages: 13,
  1050. NumExtensions: 0,
  1051. NumServices: 0,
  1052. },
  1053. GoTypes: file_app_router_config_proto_goTypes,
  1054. DependencyIndexes: file_app_router_config_proto_depIdxs,
  1055. EnumInfos: file_app_router_config_proto_enumTypes,
  1056. MessageInfos: file_app_router_config_proto_msgTypes,
  1057. }.Build()
  1058. File_app_router_config_proto = out.File
  1059. file_app_router_config_proto_goTypes = nil
  1060. file_app_router_config_proto_depIdxs = nil
  1061. }