config.pb.go 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300
  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{11, 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. Webhook *WebhookConfig `protobuf:"bytes,22,opt,name=webhook,proto3" json:"webhook,omitempty"`
  417. unknownFields protoimpl.UnknownFields
  418. sizeCache protoimpl.SizeCache
  419. }
  420. func (x *RoutingRule) Reset() {
  421. *x = RoutingRule{}
  422. mi := &file_app_router_config_proto_msgTypes[6]
  423. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  424. ms.StoreMessageInfo(mi)
  425. }
  426. func (x *RoutingRule) String() string {
  427. return protoimpl.X.MessageStringOf(x)
  428. }
  429. func (*RoutingRule) ProtoMessage() {}
  430. func (x *RoutingRule) ProtoReflect() protoreflect.Message {
  431. mi := &file_app_router_config_proto_msgTypes[6]
  432. if x != nil {
  433. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  434. if ms.LoadMessageInfo() == nil {
  435. ms.StoreMessageInfo(mi)
  436. }
  437. return ms
  438. }
  439. return mi.MessageOf(x)
  440. }
  441. // Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead.
  442. func (*RoutingRule) Descriptor() ([]byte, []int) {
  443. return file_app_router_config_proto_rawDescGZIP(), []int{6}
  444. }
  445. func (x *RoutingRule) GetTargetTag() isRoutingRule_TargetTag {
  446. if x != nil {
  447. return x.TargetTag
  448. }
  449. return nil
  450. }
  451. func (x *RoutingRule) GetTag() string {
  452. if x != nil {
  453. if x, ok := x.TargetTag.(*RoutingRule_Tag); ok {
  454. return x.Tag
  455. }
  456. }
  457. return ""
  458. }
  459. func (x *RoutingRule) GetBalancingTag() string {
  460. if x != nil {
  461. if x, ok := x.TargetTag.(*RoutingRule_BalancingTag); ok {
  462. return x.BalancingTag
  463. }
  464. }
  465. return ""
  466. }
  467. func (x *RoutingRule) GetRuleTag() string {
  468. if x != nil {
  469. return x.RuleTag
  470. }
  471. return ""
  472. }
  473. func (x *RoutingRule) GetDomain() []*Domain {
  474. if x != nil {
  475. return x.Domain
  476. }
  477. return nil
  478. }
  479. func (x *RoutingRule) GetGeoip() []*GeoIP {
  480. if x != nil {
  481. return x.Geoip
  482. }
  483. return nil
  484. }
  485. func (x *RoutingRule) GetPortList() *net.PortList {
  486. if x != nil {
  487. return x.PortList
  488. }
  489. return nil
  490. }
  491. func (x *RoutingRule) GetNetworks() []net.Network {
  492. if x != nil {
  493. return x.Networks
  494. }
  495. return nil
  496. }
  497. func (x *RoutingRule) GetSourceGeoip() []*GeoIP {
  498. if x != nil {
  499. return x.SourceGeoip
  500. }
  501. return nil
  502. }
  503. func (x *RoutingRule) GetSourcePortList() *net.PortList {
  504. if x != nil {
  505. return x.SourcePortList
  506. }
  507. return nil
  508. }
  509. func (x *RoutingRule) GetUserEmail() []string {
  510. if x != nil {
  511. return x.UserEmail
  512. }
  513. return nil
  514. }
  515. func (x *RoutingRule) GetInboundTag() []string {
  516. if x != nil {
  517. return x.InboundTag
  518. }
  519. return nil
  520. }
  521. func (x *RoutingRule) GetProtocol() []string {
  522. if x != nil {
  523. return x.Protocol
  524. }
  525. return nil
  526. }
  527. func (x *RoutingRule) GetAttributes() map[string]string {
  528. if x != nil {
  529. return x.Attributes
  530. }
  531. return nil
  532. }
  533. func (x *RoutingRule) GetLocalGeoip() []*GeoIP {
  534. if x != nil {
  535. return x.LocalGeoip
  536. }
  537. return nil
  538. }
  539. func (x *RoutingRule) GetLocalPortList() *net.PortList {
  540. if x != nil {
  541. return x.LocalPortList
  542. }
  543. return nil
  544. }
  545. func (x *RoutingRule) GetVlessRouteList() *net.PortList {
  546. if x != nil {
  547. return x.VlessRouteList
  548. }
  549. return nil
  550. }
  551. func (x *RoutingRule) GetProcess() []string {
  552. if x != nil {
  553. return x.Process
  554. }
  555. return nil
  556. }
  557. func (x *RoutingRule) GetWebhook() *WebhookConfig {
  558. if x != nil {
  559. return x.Webhook
  560. }
  561. return nil
  562. }
  563. type isRoutingRule_TargetTag interface {
  564. isRoutingRule_TargetTag()
  565. }
  566. type RoutingRule_Tag struct {
  567. // Tag of outbound that this rule is pointing to.
  568. Tag string `protobuf:"bytes,1,opt,name=tag,proto3,oneof"`
  569. }
  570. type RoutingRule_BalancingTag struct {
  571. // Tag of routing balancer.
  572. BalancingTag string `protobuf:"bytes,12,opt,name=balancing_tag,json=balancingTag,proto3,oneof"`
  573. }
  574. func (*RoutingRule_Tag) isRoutingRule_TargetTag() {}
  575. func (*RoutingRule_BalancingTag) isRoutingRule_TargetTag() {}
  576. type WebhookConfig struct {
  577. state protoimpl.MessageState `protogen:"open.v1"`
  578. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
  579. Deduplication uint32 `protobuf:"varint,2,opt,name=deduplication,proto3" json:"deduplication,omitempty"`
  580. Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  581. unknownFields protoimpl.UnknownFields
  582. sizeCache protoimpl.SizeCache
  583. }
  584. func (x *WebhookConfig) Reset() {
  585. *x = WebhookConfig{}
  586. mi := &file_app_router_config_proto_msgTypes[7]
  587. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  588. ms.StoreMessageInfo(mi)
  589. }
  590. func (x *WebhookConfig) String() string {
  591. return protoimpl.X.MessageStringOf(x)
  592. }
  593. func (*WebhookConfig) ProtoMessage() {}
  594. func (x *WebhookConfig) ProtoReflect() protoreflect.Message {
  595. mi := &file_app_router_config_proto_msgTypes[7]
  596. if x != nil {
  597. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  598. if ms.LoadMessageInfo() == nil {
  599. ms.StoreMessageInfo(mi)
  600. }
  601. return ms
  602. }
  603. return mi.MessageOf(x)
  604. }
  605. // Deprecated: Use WebhookConfig.ProtoReflect.Descriptor instead.
  606. func (*WebhookConfig) Descriptor() ([]byte, []int) {
  607. return file_app_router_config_proto_rawDescGZIP(), []int{7}
  608. }
  609. func (x *WebhookConfig) GetUrl() string {
  610. if x != nil {
  611. return x.Url
  612. }
  613. return ""
  614. }
  615. func (x *WebhookConfig) GetDeduplication() uint32 {
  616. if x != nil {
  617. return x.Deduplication
  618. }
  619. return 0
  620. }
  621. func (x *WebhookConfig) GetHeaders() map[string]string {
  622. if x != nil {
  623. return x.Headers
  624. }
  625. return nil
  626. }
  627. type BalancingRule struct {
  628. state protoimpl.MessageState `protogen:"open.v1"`
  629. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  630. OutboundSelector []string `protobuf:"bytes,2,rep,name=outbound_selector,json=outboundSelector,proto3" json:"outbound_selector,omitempty"`
  631. Strategy string `protobuf:"bytes,3,opt,name=strategy,proto3" json:"strategy,omitempty"`
  632. StrategySettings *serial.TypedMessage `protobuf:"bytes,4,opt,name=strategy_settings,json=strategySettings,proto3" json:"strategy_settings,omitempty"`
  633. FallbackTag string `protobuf:"bytes,5,opt,name=fallback_tag,json=fallbackTag,proto3" json:"fallback_tag,omitempty"`
  634. unknownFields protoimpl.UnknownFields
  635. sizeCache protoimpl.SizeCache
  636. }
  637. func (x *BalancingRule) Reset() {
  638. *x = BalancingRule{}
  639. mi := &file_app_router_config_proto_msgTypes[8]
  640. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  641. ms.StoreMessageInfo(mi)
  642. }
  643. func (x *BalancingRule) String() string {
  644. return protoimpl.X.MessageStringOf(x)
  645. }
  646. func (*BalancingRule) ProtoMessage() {}
  647. func (x *BalancingRule) ProtoReflect() protoreflect.Message {
  648. mi := &file_app_router_config_proto_msgTypes[8]
  649. if x != nil {
  650. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  651. if ms.LoadMessageInfo() == nil {
  652. ms.StoreMessageInfo(mi)
  653. }
  654. return ms
  655. }
  656. return mi.MessageOf(x)
  657. }
  658. // Deprecated: Use BalancingRule.ProtoReflect.Descriptor instead.
  659. func (*BalancingRule) Descriptor() ([]byte, []int) {
  660. return file_app_router_config_proto_rawDescGZIP(), []int{8}
  661. }
  662. func (x *BalancingRule) GetTag() string {
  663. if x != nil {
  664. return x.Tag
  665. }
  666. return ""
  667. }
  668. func (x *BalancingRule) GetOutboundSelector() []string {
  669. if x != nil {
  670. return x.OutboundSelector
  671. }
  672. return nil
  673. }
  674. func (x *BalancingRule) GetStrategy() string {
  675. if x != nil {
  676. return x.Strategy
  677. }
  678. return ""
  679. }
  680. func (x *BalancingRule) GetStrategySettings() *serial.TypedMessage {
  681. if x != nil {
  682. return x.StrategySettings
  683. }
  684. return nil
  685. }
  686. func (x *BalancingRule) GetFallbackTag() string {
  687. if x != nil {
  688. return x.FallbackTag
  689. }
  690. return ""
  691. }
  692. type StrategyWeight struct {
  693. state protoimpl.MessageState `protogen:"open.v1"`
  694. Regexp bool `protobuf:"varint,1,opt,name=regexp,proto3" json:"regexp,omitempty"`
  695. Match string `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"`
  696. Value float32 `protobuf:"fixed32,3,opt,name=value,proto3" json:"value,omitempty"`
  697. unknownFields protoimpl.UnknownFields
  698. sizeCache protoimpl.SizeCache
  699. }
  700. func (x *StrategyWeight) Reset() {
  701. *x = StrategyWeight{}
  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 *StrategyWeight) String() string {
  707. return protoimpl.X.MessageStringOf(x)
  708. }
  709. func (*StrategyWeight) ProtoMessage() {}
  710. func (x *StrategyWeight) 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 StrategyWeight.ProtoReflect.Descriptor instead.
  722. func (*StrategyWeight) Descriptor() ([]byte, []int) {
  723. return file_app_router_config_proto_rawDescGZIP(), []int{9}
  724. }
  725. func (x *StrategyWeight) GetRegexp() bool {
  726. if x != nil {
  727. return x.Regexp
  728. }
  729. return false
  730. }
  731. func (x *StrategyWeight) GetMatch() string {
  732. if x != nil {
  733. return x.Match
  734. }
  735. return ""
  736. }
  737. func (x *StrategyWeight) GetValue() float32 {
  738. if x != nil {
  739. return x.Value
  740. }
  741. return 0
  742. }
  743. type StrategyLeastLoadConfig struct {
  744. state protoimpl.MessageState `protogen:"open.v1"`
  745. // weight settings
  746. Costs []*StrategyWeight `protobuf:"bytes,2,rep,name=costs,proto3" json:"costs,omitempty"`
  747. // RTT baselines for selecting, int64 values of time.Duration
  748. Baselines []int64 `protobuf:"varint,3,rep,packed,name=baselines,proto3" json:"baselines,omitempty"`
  749. // expected nodes count to select
  750. Expected int32 `protobuf:"varint,4,opt,name=expected,proto3" json:"expected,omitempty"`
  751. // max acceptable rtt, filter away high delay nodes. default 0
  752. MaxRTT int64 `protobuf:"varint,5,opt,name=maxRTT,proto3" json:"maxRTT,omitempty"`
  753. // acceptable failure rate
  754. Tolerance float32 `protobuf:"fixed32,6,opt,name=tolerance,proto3" json:"tolerance,omitempty"`
  755. unknownFields protoimpl.UnknownFields
  756. sizeCache protoimpl.SizeCache
  757. }
  758. func (x *StrategyLeastLoadConfig) Reset() {
  759. *x = StrategyLeastLoadConfig{}
  760. mi := &file_app_router_config_proto_msgTypes[10]
  761. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  762. ms.StoreMessageInfo(mi)
  763. }
  764. func (x *StrategyLeastLoadConfig) String() string {
  765. return protoimpl.X.MessageStringOf(x)
  766. }
  767. func (*StrategyLeastLoadConfig) ProtoMessage() {}
  768. func (x *StrategyLeastLoadConfig) ProtoReflect() protoreflect.Message {
  769. mi := &file_app_router_config_proto_msgTypes[10]
  770. if x != nil {
  771. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  772. if ms.LoadMessageInfo() == nil {
  773. ms.StoreMessageInfo(mi)
  774. }
  775. return ms
  776. }
  777. return mi.MessageOf(x)
  778. }
  779. // Deprecated: Use StrategyLeastLoadConfig.ProtoReflect.Descriptor instead.
  780. func (*StrategyLeastLoadConfig) Descriptor() ([]byte, []int) {
  781. return file_app_router_config_proto_rawDescGZIP(), []int{10}
  782. }
  783. func (x *StrategyLeastLoadConfig) GetCosts() []*StrategyWeight {
  784. if x != nil {
  785. return x.Costs
  786. }
  787. return nil
  788. }
  789. func (x *StrategyLeastLoadConfig) GetBaselines() []int64 {
  790. if x != nil {
  791. return x.Baselines
  792. }
  793. return nil
  794. }
  795. func (x *StrategyLeastLoadConfig) GetExpected() int32 {
  796. if x != nil {
  797. return x.Expected
  798. }
  799. return 0
  800. }
  801. func (x *StrategyLeastLoadConfig) GetMaxRTT() int64 {
  802. if x != nil {
  803. return x.MaxRTT
  804. }
  805. return 0
  806. }
  807. func (x *StrategyLeastLoadConfig) GetTolerance() float32 {
  808. if x != nil {
  809. return x.Tolerance
  810. }
  811. return 0
  812. }
  813. type Config struct {
  814. state protoimpl.MessageState `protogen:"open.v1"`
  815. DomainStrategy Config_DomainStrategy `protobuf:"varint,1,opt,name=domain_strategy,json=domainStrategy,proto3,enum=xray.app.router.Config_DomainStrategy" json:"domain_strategy,omitempty"`
  816. Rule []*RoutingRule `protobuf:"bytes,2,rep,name=rule,proto3" json:"rule,omitempty"`
  817. BalancingRule []*BalancingRule `protobuf:"bytes,3,rep,name=balancing_rule,json=balancingRule,proto3" json:"balancing_rule,omitempty"`
  818. unknownFields protoimpl.UnknownFields
  819. sizeCache protoimpl.SizeCache
  820. }
  821. func (x *Config) Reset() {
  822. *x = Config{}
  823. mi := &file_app_router_config_proto_msgTypes[11]
  824. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  825. ms.StoreMessageInfo(mi)
  826. }
  827. func (x *Config) String() string {
  828. return protoimpl.X.MessageStringOf(x)
  829. }
  830. func (*Config) ProtoMessage() {}
  831. func (x *Config) ProtoReflect() protoreflect.Message {
  832. mi := &file_app_router_config_proto_msgTypes[11]
  833. if x != nil {
  834. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  835. if ms.LoadMessageInfo() == nil {
  836. ms.StoreMessageInfo(mi)
  837. }
  838. return ms
  839. }
  840. return mi.MessageOf(x)
  841. }
  842. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  843. func (*Config) Descriptor() ([]byte, []int) {
  844. return file_app_router_config_proto_rawDescGZIP(), []int{11}
  845. }
  846. func (x *Config) GetDomainStrategy() Config_DomainStrategy {
  847. if x != nil {
  848. return x.DomainStrategy
  849. }
  850. return Config_AsIs
  851. }
  852. func (x *Config) GetRule() []*RoutingRule {
  853. if x != nil {
  854. return x.Rule
  855. }
  856. return nil
  857. }
  858. func (x *Config) GetBalancingRule() []*BalancingRule {
  859. if x != nil {
  860. return x.BalancingRule
  861. }
  862. return nil
  863. }
  864. type Domain_Attribute struct {
  865. state protoimpl.MessageState `protogen:"open.v1"`
  866. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  867. // Types that are valid to be assigned to TypedValue:
  868. //
  869. // *Domain_Attribute_BoolValue
  870. // *Domain_Attribute_IntValue
  871. TypedValue isDomain_Attribute_TypedValue `protobuf_oneof:"typed_value"`
  872. unknownFields protoimpl.UnknownFields
  873. sizeCache protoimpl.SizeCache
  874. }
  875. func (x *Domain_Attribute) Reset() {
  876. *x = Domain_Attribute{}
  877. mi := &file_app_router_config_proto_msgTypes[12]
  878. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  879. ms.StoreMessageInfo(mi)
  880. }
  881. func (x *Domain_Attribute) String() string {
  882. return protoimpl.X.MessageStringOf(x)
  883. }
  884. func (*Domain_Attribute) ProtoMessage() {}
  885. func (x *Domain_Attribute) ProtoReflect() protoreflect.Message {
  886. mi := &file_app_router_config_proto_msgTypes[12]
  887. if x != nil {
  888. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  889. if ms.LoadMessageInfo() == nil {
  890. ms.StoreMessageInfo(mi)
  891. }
  892. return ms
  893. }
  894. return mi.MessageOf(x)
  895. }
  896. // Deprecated: Use Domain_Attribute.ProtoReflect.Descriptor instead.
  897. func (*Domain_Attribute) Descriptor() ([]byte, []int) {
  898. return file_app_router_config_proto_rawDescGZIP(), []int{0, 0}
  899. }
  900. func (x *Domain_Attribute) GetKey() string {
  901. if x != nil {
  902. return x.Key
  903. }
  904. return ""
  905. }
  906. func (x *Domain_Attribute) GetTypedValue() isDomain_Attribute_TypedValue {
  907. if x != nil {
  908. return x.TypedValue
  909. }
  910. return nil
  911. }
  912. func (x *Domain_Attribute) GetBoolValue() bool {
  913. if x != nil {
  914. if x, ok := x.TypedValue.(*Domain_Attribute_BoolValue); ok {
  915. return x.BoolValue
  916. }
  917. }
  918. return false
  919. }
  920. func (x *Domain_Attribute) GetIntValue() int64 {
  921. if x != nil {
  922. if x, ok := x.TypedValue.(*Domain_Attribute_IntValue); ok {
  923. return x.IntValue
  924. }
  925. }
  926. return 0
  927. }
  928. type isDomain_Attribute_TypedValue interface {
  929. isDomain_Attribute_TypedValue()
  930. }
  931. type Domain_Attribute_BoolValue struct {
  932. BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"`
  933. }
  934. type Domain_Attribute_IntValue struct {
  935. IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"`
  936. }
  937. func (*Domain_Attribute_BoolValue) isDomain_Attribute_TypedValue() {}
  938. func (*Domain_Attribute_IntValue) isDomain_Attribute_TypedValue() {}
  939. var File_app_router_config_proto protoreflect.FileDescriptor
  940. const file_app_router_config_proto_rawDesc = "" +
  941. "\n" +
  942. "\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" +
  943. "\x06Domain\x120\n" +
  944. "\x04type\x18\x01 \x01(\x0e2\x1c.xray.app.router.Domain.TypeR\x04type\x12\x14\n" +
  945. "\x05value\x18\x02 \x01(\tR\x05value\x12?\n" +
  946. "\tattribute\x18\x03 \x03(\v2!.xray.app.router.Domain.AttributeR\tattribute\x1al\n" +
  947. "\tAttribute\x12\x10\n" +
  948. "\x03key\x18\x01 \x01(\tR\x03key\x12\x1f\n" +
  949. "\n" +
  950. "bool_value\x18\x02 \x01(\bH\x00R\tboolValue\x12\x1d\n" +
  951. "\tint_value\x18\x03 \x01(\x03H\x00R\bintValueB\r\n" +
  952. "\vtyped_value\"2\n" +
  953. "\x04Type\x12\t\n" +
  954. "\x05Plain\x10\x00\x12\t\n" +
  955. "\x05Regex\x10\x01\x12\n" +
  956. "\n" +
  957. "\x06Domain\x10\x02\x12\b\n" +
  958. "\x04Full\x10\x03\".\n" +
  959. "\x04CIDR\x12\x0e\n" +
  960. "\x02ip\x18\x01 \x01(\fR\x02ip\x12\x16\n" +
  961. "\x06prefix\x18\x02 \x01(\rR\x06prefix\"z\n" +
  962. "\x05GeoIP\x12!\n" +
  963. "\fcountry_code\x18\x01 \x01(\tR\vcountryCode\x12)\n" +
  964. "\x04cidr\x18\x02 \x03(\v2\x15.xray.app.router.CIDRR\x04cidr\x12#\n" +
  965. "\rreverse_match\x18\x03 \x01(\bR\freverseMatch\"9\n" +
  966. "\tGeoIPList\x12,\n" +
  967. "\x05entry\x18\x01 \x03(\v2\x16.xray.app.router.GeoIPR\x05entry\"]\n" +
  968. "\aGeoSite\x12!\n" +
  969. "\fcountry_code\x18\x01 \x01(\tR\vcountryCode\x12/\n" +
  970. "\x06domain\x18\x02 \x03(\v2\x17.xray.app.router.DomainR\x06domain\"=\n" +
  971. "\vGeoSiteList\x12.\n" +
  972. "\x05entry\x18\x01 \x03(\v2\x18.xray.app.router.GeoSiteR\x05entry\"\xbc\a\n" +
  973. "\vRoutingRule\x12\x12\n" +
  974. "\x03tag\x18\x01 \x01(\tH\x00R\x03tag\x12%\n" +
  975. "\rbalancing_tag\x18\f \x01(\tH\x00R\fbalancingTag\x12\x19\n" +
  976. "\brule_tag\x18\x13 \x01(\tR\aruleTag\x12/\n" +
  977. "\x06domain\x18\x02 \x03(\v2\x17.xray.app.router.DomainR\x06domain\x12,\n" +
  978. "\x05geoip\x18\n" +
  979. " \x03(\v2\x16.xray.app.router.GeoIPR\x05geoip\x126\n" +
  980. "\tport_list\x18\x0e \x01(\v2\x19.xray.common.net.PortListR\bportList\x124\n" +
  981. "\bnetworks\x18\r \x03(\x0e2\x18.xray.common.net.NetworkR\bnetworks\x129\n" +
  982. "\fsource_geoip\x18\v \x03(\v2\x16.xray.app.router.GeoIPR\vsourceGeoip\x12C\n" +
  983. "\x10source_port_list\x18\x10 \x01(\v2\x19.xray.common.net.PortListR\x0esourcePortList\x12\x1d\n" +
  984. "\n" +
  985. "user_email\x18\a \x03(\tR\tuserEmail\x12\x1f\n" +
  986. "\vinbound_tag\x18\b \x03(\tR\n" +
  987. "inboundTag\x12\x1a\n" +
  988. "\bprotocol\x18\t \x03(\tR\bprotocol\x12L\n" +
  989. "\n" +
  990. "attributes\x18\x0f \x03(\v2,.xray.app.router.RoutingRule.AttributesEntryR\n" +
  991. "attributes\x127\n" +
  992. "\vlocal_geoip\x18\x11 \x03(\v2\x16.xray.app.router.GeoIPR\n" +
  993. "localGeoip\x12A\n" +
  994. "\x0flocal_port_list\x18\x12 \x01(\v2\x19.xray.common.net.PortListR\rlocalPortList\x12C\n" +
  995. "\x10vless_route_list\x18\x14 \x01(\v2\x19.xray.common.net.PortListR\x0evlessRouteList\x12\x18\n" +
  996. "\aprocess\x18\x15 \x03(\tR\aprocess\x128\n" +
  997. "\awebhook\x18\x16 \x01(\v2\x1e.xray.app.router.WebhookConfigR\awebhook\x1a=\n" +
  998. "\x0fAttributesEntry\x12\x10\n" +
  999. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  1000. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\f\n" +
  1001. "\n" +
  1002. "target_tag\"\xca\x01\n" +
  1003. "\rWebhookConfig\x12\x10\n" +
  1004. "\x03url\x18\x01 \x01(\tR\x03url\x12$\n" +
  1005. "\rdeduplication\x18\x02 \x01(\rR\rdeduplication\x12E\n" +
  1006. "\aheaders\x18\x03 \x03(\v2+.xray.app.router.WebhookConfig.HeadersEntryR\aheaders\x1a:\n" +
  1007. "\fHeadersEntry\x12\x10\n" +
  1008. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  1009. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xdc\x01\n" +
  1010. "\rBalancingRule\x12\x10\n" +
  1011. "\x03tag\x18\x01 \x01(\tR\x03tag\x12+\n" +
  1012. "\x11outbound_selector\x18\x02 \x03(\tR\x10outboundSelector\x12\x1a\n" +
  1013. "\bstrategy\x18\x03 \x01(\tR\bstrategy\x12M\n" +
  1014. "\x11strategy_settings\x18\x04 \x01(\v2 .xray.common.serial.TypedMessageR\x10strategySettings\x12!\n" +
  1015. "\ffallback_tag\x18\x05 \x01(\tR\vfallbackTag\"T\n" +
  1016. "\x0eStrategyWeight\x12\x16\n" +
  1017. "\x06regexp\x18\x01 \x01(\bR\x06regexp\x12\x14\n" +
  1018. "\x05match\x18\x02 \x01(\tR\x05match\x12\x14\n" +
  1019. "\x05value\x18\x03 \x01(\x02R\x05value\"\xc0\x01\n" +
  1020. "\x17StrategyLeastLoadConfig\x125\n" +
  1021. "\x05costs\x18\x02 \x03(\v2\x1f.xray.app.router.StrategyWeightR\x05costs\x12\x1c\n" +
  1022. "\tbaselines\x18\x03 \x03(\x03R\tbaselines\x12\x1a\n" +
  1023. "\bexpected\x18\x04 \x01(\x05R\bexpected\x12\x16\n" +
  1024. "\x06maxRTT\x18\x05 \x01(\x03R\x06maxRTT\x12\x1c\n" +
  1025. "\ttolerance\x18\x06 \x01(\x02R\ttolerance\"\x90\x02\n" +
  1026. "\x06Config\x12O\n" +
  1027. "\x0fdomain_strategy\x18\x01 \x01(\x0e2&.xray.app.router.Config.DomainStrategyR\x0edomainStrategy\x120\n" +
  1028. "\x04rule\x18\x02 \x03(\v2\x1c.xray.app.router.RoutingRuleR\x04rule\x12E\n" +
  1029. "\x0ebalancing_rule\x18\x03 \x03(\v2\x1e.xray.app.router.BalancingRuleR\rbalancingRule\"<\n" +
  1030. "\x0eDomainStrategy\x12\b\n" +
  1031. "\x04AsIs\x10\x00\x12\x10\n" +
  1032. "\fIpIfNonMatch\x10\x02\x12\x0e\n" +
  1033. "\n" +
  1034. "IpOnDemand\x10\x03BO\n" +
  1035. "\x13com.xray.app.routerP\x01Z$github.com/xtls/xray-core/app/router\xaa\x02\x0fXray.App.Routerb\x06proto3"
  1036. var (
  1037. file_app_router_config_proto_rawDescOnce sync.Once
  1038. file_app_router_config_proto_rawDescData []byte
  1039. )
  1040. func file_app_router_config_proto_rawDescGZIP() []byte {
  1041. file_app_router_config_proto_rawDescOnce.Do(func() {
  1042. 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)))
  1043. })
  1044. return file_app_router_config_proto_rawDescData
  1045. }
  1046. var file_app_router_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
  1047. var file_app_router_config_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
  1048. var file_app_router_config_proto_goTypes = []any{
  1049. (Domain_Type)(0), // 0: xray.app.router.Domain.Type
  1050. (Config_DomainStrategy)(0), // 1: xray.app.router.Config.DomainStrategy
  1051. (*Domain)(nil), // 2: xray.app.router.Domain
  1052. (*CIDR)(nil), // 3: xray.app.router.CIDR
  1053. (*GeoIP)(nil), // 4: xray.app.router.GeoIP
  1054. (*GeoIPList)(nil), // 5: xray.app.router.GeoIPList
  1055. (*GeoSite)(nil), // 6: xray.app.router.GeoSite
  1056. (*GeoSiteList)(nil), // 7: xray.app.router.GeoSiteList
  1057. (*RoutingRule)(nil), // 8: xray.app.router.RoutingRule
  1058. (*WebhookConfig)(nil), // 9: xray.app.router.WebhookConfig
  1059. (*BalancingRule)(nil), // 10: xray.app.router.BalancingRule
  1060. (*StrategyWeight)(nil), // 11: xray.app.router.StrategyWeight
  1061. (*StrategyLeastLoadConfig)(nil), // 12: xray.app.router.StrategyLeastLoadConfig
  1062. (*Config)(nil), // 13: xray.app.router.Config
  1063. (*Domain_Attribute)(nil), // 14: xray.app.router.Domain.Attribute
  1064. nil, // 15: xray.app.router.RoutingRule.AttributesEntry
  1065. nil, // 16: xray.app.router.WebhookConfig.HeadersEntry
  1066. (*net.PortList)(nil), // 17: xray.common.net.PortList
  1067. (net.Network)(0), // 18: xray.common.net.Network
  1068. (*serial.TypedMessage)(nil), // 19: xray.common.serial.TypedMessage
  1069. }
  1070. var file_app_router_config_proto_depIdxs = []int32{
  1071. 0, // 0: xray.app.router.Domain.type:type_name -> xray.app.router.Domain.Type
  1072. 14, // 1: xray.app.router.Domain.attribute:type_name -> xray.app.router.Domain.Attribute
  1073. 3, // 2: xray.app.router.GeoIP.cidr:type_name -> xray.app.router.CIDR
  1074. 4, // 3: xray.app.router.GeoIPList.entry:type_name -> xray.app.router.GeoIP
  1075. 2, // 4: xray.app.router.GeoSite.domain:type_name -> xray.app.router.Domain
  1076. 6, // 5: xray.app.router.GeoSiteList.entry:type_name -> xray.app.router.GeoSite
  1077. 2, // 6: xray.app.router.RoutingRule.domain:type_name -> xray.app.router.Domain
  1078. 4, // 7: xray.app.router.RoutingRule.geoip:type_name -> xray.app.router.GeoIP
  1079. 17, // 8: xray.app.router.RoutingRule.port_list:type_name -> xray.common.net.PortList
  1080. 18, // 9: xray.app.router.RoutingRule.networks:type_name -> xray.common.net.Network
  1081. 4, // 10: xray.app.router.RoutingRule.source_geoip:type_name -> xray.app.router.GeoIP
  1082. 17, // 11: xray.app.router.RoutingRule.source_port_list:type_name -> xray.common.net.PortList
  1083. 15, // 12: xray.app.router.RoutingRule.attributes:type_name -> xray.app.router.RoutingRule.AttributesEntry
  1084. 4, // 13: xray.app.router.RoutingRule.local_geoip:type_name -> xray.app.router.GeoIP
  1085. 17, // 14: xray.app.router.RoutingRule.local_port_list:type_name -> xray.common.net.PortList
  1086. 17, // 15: xray.app.router.RoutingRule.vless_route_list:type_name -> xray.common.net.PortList
  1087. 9, // 16: xray.app.router.RoutingRule.webhook:type_name -> xray.app.router.WebhookConfig
  1088. 16, // 17: xray.app.router.WebhookConfig.headers:type_name -> xray.app.router.WebhookConfig.HeadersEntry
  1089. 19, // 18: xray.app.router.BalancingRule.strategy_settings:type_name -> xray.common.serial.TypedMessage
  1090. 11, // 19: xray.app.router.StrategyLeastLoadConfig.costs:type_name -> xray.app.router.StrategyWeight
  1091. 1, // 20: xray.app.router.Config.domain_strategy:type_name -> xray.app.router.Config.DomainStrategy
  1092. 8, // 21: xray.app.router.Config.rule:type_name -> xray.app.router.RoutingRule
  1093. 10, // 22: xray.app.router.Config.balancing_rule:type_name -> xray.app.router.BalancingRule
  1094. 23, // [23:23] is the sub-list for method output_type
  1095. 23, // [23:23] is the sub-list for method input_type
  1096. 23, // [23:23] is the sub-list for extension type_name
  1097. 23, // [23:23] is the sub-list for extension extendee
  1098. 0, // [0:23] is the sub-list for field type_name
  1099. }
  1100. func init() { file_app_router_config_proto_init() }
  1101. func file_app_router_config_proto_init() {
  1102. if File_app_router_config_proto != nil {
  1103. return
  1104. }
  1105. file_app_router_config_proto_msgTypes[6].OneofWrappers = []any{
  1106. (*RoutingRule_Tag)(nil),
  1107. (*RoutingRule_BalancingTag)(nil),
  1108. }
  1109. file_app_router_config_proto_msgTypes[12].OneofWrappers = []any{
  1110. (*Domain_Attribute_BoolValue)(nil),
  1111. (*Domain_Attribute_IntValue)(nil),
  1112. }
  1113. type x struct{}
  1114. out := protoimpl.TypeBuilder{
  1115. File: protoimpl.DescBuilder{
  1116. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  1117. RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_router_config_proto_rawDesc), len(file_app_router_config_proto_rawDesc)),
  1118. NumEnums: 2,
  1119. NumMessages: 15,
  1120. NumExtensions: 0,
  1121. NumServices: 0,
  1122. },
  1123. GoTypes: file_app_router_config_proto_goTypes,
  1124. DependencyIndexes: file_app_router_config_proto_depIdxs,
  1125. EnumInfos: file_app_router_config_proto_enumTypes,
  1126. MessageInfos: file_app_router_config_proto_msgTypes,
  1127. }.Build()
  1128. File_app_router_config_proto = out.File
  1129. file_app_router_config_proto_goTypes = nil
  1130. file_app_router_config_proto_depIdxs = nil
  1131. }