config.pb.go 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.27.1
  4. // protoc v3.17.3
  5. // source: app/router/config.proto
  6. package router
  7. import (
  8. routercommon "github.com/v2fly/v2ray-core/v4/app/router/routercommon"
  9. net "github.com/v2fly/v2ray-core/v4/common/net"
  10. _ "github.com/v2fly/v2ray-core/v4/common/protoext"
  11. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  12. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  13. anypb "google.golang.org/protobuf/types/known/anypb"
  14. reflect "reflect"
  15. sync "sync"
  16. )
  17. const (
  18. // Verify that this generated code is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  20. // Verify that runtime/protoimpl is sufficiently up-to-date.
  21. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  22. )
  23. type DomainStrategy int32
  24. const (
  25. // Use domain as is.
  26. DomainStrategy_AsIs DomainStrategy = 0
  27. // Always resolve IP for domains.
  28. DomainStrategy_UseIp DomainStrategy = 1
  29. // Resolve to IP if the domain doesn't match any rules.
  30. DomainStrategy_IpIfNonMatch DomainStrategy = 2
  31. // Resolve to IP if any rule requires IP matching.
  32. DomainStrategy_IpOnDemand DomainStrategy = 3
  33. )
  34. // Enum value maps for DomainStrategy.
  35. var (
  36. DomainStrategy_name = map[int32]string{
  37. 0: "AsIs",
  38. 1: "UseIp",
  39. 2: "IpIfNonMatch",
  40. 3: "IpOnDemand",
  41. }
  42. DomainStrategy_value = map[string]int32{
  43. "AsIs": 0,
  44. "UseIp": 1,
  45. "IpIfNonMatch": 2,
  46. "IpOnDemand": 3,
  47. }
  48. )
  49. func (x DomainStrategy) Enum() *DomainStrategy {
  50. p := new(DomainStrategy)
  51. *p = x
  52. return p
  53. }
  54. func (x DomainStrategy) String() string {
  55. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  56. }
  57. func (DomainStrategy) Descriptor() protoreflect.EnumDescriptor {
  58. return file_app_router_config_proto_enumTypes[0].Descriptor()
  59. }
  60. func (DomainStrategy) Type() protoreflect.EnumType {
  61. return &file_app_router_config_proto_enumTypes[0]
  62. }
  63. func (x DomainStrategy) Number() protoreflect.EnumNumber {
  64. return protoreflect.EnumNumber(x)
  65. }
  66. // Deprecated: Use DomainStrategy.Descriptor instead.
  67. func (DomainStrategy) EnumDescriptor() ([]byte, []int) {
  68. return file_app_router_config_proto_rawDescGZIP(), []int{0}
  69. }
  70. type RoutingRule struct {
  71. state protoimpl.MessageState
  72. sizeCache protoimpl.SizeCache
  73. unknownFields protoimpl.UnknownFields
  74. // Types that are assignable to TargetTag:
  75. // *RoutingRule_Tag
  76. // *RoutingRule_BalancingTag
  77. TargetTag isRoutingRule_TargetTag `protobuf_oneof:"target_tag"`
  78. // List of domains for target domain matching.
  79. Domain []*routercommon.Domain `protobuf:"bytes,2,rep,name=domain,proto3" json:"domain,omitempty"`
  80. // List of CIDRs for target IP address matching.
  81. // Deprecated. Use geoip below.
  82. //
  83. // Deprecated: Do not use.
  84. Cidr []*routercommon.CIDR `protobuf:"bytes,3,rep,name=cidr,proto3" json:"cidr,omitempty"`
  85. // List of GeoIPs for target IP address matching. If this entry exists, the
  86. // cidr above will have no effect. GeoIP fields with the same country code are
  87. // supposed to contain exactly same content. They will be merged during
  88. // runtime. For customized GeoIPs, please leave country code empty.
  89. Geoip []*routercommon.GeoIP `protobuf:"bytes,10,rep,name=geoip,proto3" json:"geoip,omitempty"`
  90. // A range of port [from, to]. If the destination port is in this range, this
  91. // rule takes effect. Deprecated. Use port_list.
  92. //
  93. // Deprecated: Do not use.
  94. PortRange *net.PortRange `protobuf:"bytes,4,opt,name=port_range,json=portRange,proto3" json:"port_range,omitempty"`
  95. // List of ports.
  96. PortList *net.PortList `protobuf:"bytes,14,opt,name=port_list,json=portList,proto3" json:"port_list,omitempty"`
  97. // List of networks. Deprecated. Use networks.
  98. //
  99. // Deprecated: Do not use.
  100. NetworkList *net.NetworkList `protobuf:"bytes,5,opt,name=network_list,json=networkList,proto3" json:"network_list,omitempty"`
  101. // List of networks for matching.
  102. Networks []net.Network `protobuf:"varint,13,rep,packed,name=networks,proto3,enum=v2ray.core.common.net.Network" json:"networks,omitempty"`
  103. // List of CIDRs for source IP address matching.
  104. //
  105. // Deprecated: Do not use.
  106. SourceCidr []*routercommon.CIDR `protobuf:"bytes,6,rep,name=source_cidr,json=sourceCidr,proto3" json:"source_cidr,omitempty"`
  107. // List of GeoIPs for source IP address matching. If this entry exists, the
  108. // source_cidr above will have no effect.
  109. SourceGeoip []*routercommon.GeoIP `protobuf:"bytes,11,rep,name=source_geoip,json=sourceGeoip,proto3" json:"source_geoip,omitempty"`
  110. // List of ports for source port matching.
  111. SourcePortList *net.PortList `protobuf:"bytes,16,opt,name=source_port_list,json=sourcePortList,proto3" json:"source_port_list,omitempty"`
  112. UserEmail []string `protobuf:"bytes,7,rep,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"`
  113. InboundTag []string `protobuf:"bytes,8,rep,name=inbound_tag,json=inboundTag,proto3" json:"inbound_tag,omitempty"`
  114. Protocol []string `protobuf:"bytes,9,rep,name=protocol,proto3" json:"protocol,omitempty"`
  115. Attributes string `protobuf:"bytes,15,opt,name=attributes,proto3" json:"attributes,omitempty"`
  116. DomainMatcher string `protobuf:"bytes,17,opt,name=domain_matcher,json=domainMatcher,proto3" json:"domain_matcher,omitempty"`
  117. // geo_domain instruct simplified config loader to load geo domain rule and fill in domain field.
  118. GeoDomain []*routercommon.GeoSite `protobuf:"bytes,68001,rep,name=geo_domain,json=geoDomain,proto3" json:"geo_domain,omitempty"`
  119. }
  120. func (x *RoutingRule) Reset() {
  121. *x = RoutingRule{}
  122. if protoimpl.UnsafeEnabled {
  123. mi := &file_app_router_config_proto_msgTypes[0]
  124. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  125. ms.StoreMessageInfo(mi)
  126. }
  127. }
  128. func (x *RoutingRule) String() string {
  129. return protoimpl.X.MessageStringOf(x)
  130. }
  131. func (*RoutingRule) ProtoMessage() {}
  132. func (x *RoutingRule) ProtoReflect() protoreflect.Message {
  133. mi := &file_app_router_config_proto_msgTypes[0]
  134. if protoimpl.UnsafeEnabled && x != nil {
  135. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  136. if ms.LoadMessageInfo() == nil {
  137. ms.StoreMessageInfo(mi)
  138. }
  139. return ms
  140. }
  141. return mi.MessageOf(x)
  142. }
  143. // Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead.
  144. func (*RoutingRule) Descriptor() ([]byte, []int) {
  145. return file_app_router_config_proto_rawDescGZIP(), []int{0}
  146. }
  147. func (m *RoutingRule) GetTargetTag() isRoutingRule_TargetTag {
  148. if m != nil {
  149. return m.TargetTag
  150. }
  151. return nil
  152. }
  153. func (x *RoutingRule) GetTag() string {
  154. if x, ok := x.GetTargetTag().(*RoutingRule_Tag); ok {
  155. return x.Tag
  156. }
  157. return ""
  158. }
  159. func (x *RoutingRule) GetBalancingTag() string {
  160. if x, ok := x.GetTargetTag().(*RoutingRule_BalancingTag); ok {
  161. return x.BalancingTag
  162. }
  163. return ""
  164. }
  165. func (x *RoutingRule) GetDomain() []*routercommon.Domain {
  166. if x != nil {
  167. return x.Domain
  168. }
  169. return nil
  170. }
  171. // Deprecated: Do not use.
  172. func (x *RoutingRule) GetCidr() []*routercommon.CIDR {
  173. if x != nil {
  174. return x.Cidr
  175. }
  176. return nil
  177. }
  178. func (x *RoutingRule) GetGeoip() []*routercommon.GeoIP {
  179. if x != nil {
  180. return x.Geoip
  181. }
  182. return nil
  183. }
  184. // Deprecated: Do not use.
  185. func (x *RoutingRule) GetPortRange() *net.PortRange {
  186. if x != nil {
  187. return x.PortRange
  188. }
  189. return nil
  190. }
  191. func (x *RoutingRule) GetPortList() *net.PortList {
  192. if x != nil {
  193. return x.PortList
  194. }
  195. return nil
  196. }
  197. // Deprecated: Do not use.
  198. func (x *RoutingRule) GetNetworkList() *net.NetworkList {
  199. if x != nil {
  200. return x.NetworkList
  201. }
  202. return nil
  203. }
  204. func (x *RoutingRule) GetNetworks() []net.Network {
  205. if x != nil {
  206. return x.Networks
  207. }
  208. return nil
  209. }
  210. // Deprecated: Do not use.
  211. func (x *RoutingRule) GetSourceCidr() []*routercommon.CIDR {
  212. if x != nil {
  213. return x.SourceCidr
  214. }
  215. return nil
  216. }
  217. func (x *RoutingRule) GetSourceGeoip() []*routercommon.GeoIP {
  218. if x != nil {
  219. return x.SourceGeoip
  220. }
  221. return nil
  222. }
  223. func (x *RoutingRule) GetSourcePortList() *net.PortList {
  224. if x != nil {
  225. return x.SourcePortList
  226. }
  227. return nil
  228. }
  229. func (x *RoutingRule) GetUserEmail() []string {
  230. if x != nil {
  231. return x.UserEmail
  232. }
  233. return nil
  234. }
  235. func (x *RoutingRule) GetInboundTag() []string {
  236. if x != nil {
  237. return x.InboundTag
  238. }
  239. return nil
  240. }
  241. func (x *RoutingRule) GetProtocol() []string {
  242. if x != nil {
  243. return x.Protocol
  244. }
  245. return nil
  246. }
  247. func (x *RoutingRule) GetAttributes() string {
  248. if x != nil {
  249. return x.Attributes
  250. }
  251. return ""
  252. }
  253. func (x *RoutingRule) GetDomainMatcher() string {
  254. if x != nil {
  255. return x.DomainMatcher
  256. }
  257. return ""
  258. }
  259. func (x *RoutingRule) GetGeoDomain() []*routercommon.GeoSite {
  260. if x != nil {
  261. return x.GeoDomain
  262. }
  263. return nil
  264. }
  265. type isRoutingRule_TargetTag interface {
  266. isRoutingRule_TargetTag()
  267. }
  268. type RoutingRule_Tag struct {
  269. // Tag of outbound that this rule is pointing to.
  270. Tag string `protobuf:"bytes,1,opt,name=tag,proto3,oneof"`
  271. }
  272. type RoutingRule_BalancingTag struct {
  273. // Tag of routing balancer.
  274. BalancingTag string `protobuf:"bytes,12,opt,name=balancing_tag,json=balancingTag,proto3,oneof"`
  275. }
  276. func (*RoutingRule_Tag) isRoutingRule_TargetTag() {}
  277. func (*RoutingRule_BalancingTag) isRoutingRule_TargetTag() {}
  278. type BalancingRule struct {
  279. state protoimpl.MessageState
  280. sizeCache protoimpl.SizeCache
  281. unknownFields protoimpl.UnknownFields
  282. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  283. OutboundSelector []string `protobuf:"bytes,2,rep,name=outbound_selector,json=outboundSelector,proto3" json:"outbound_selector,omitempty"`
  284. Strategy string `protobuf:"bytes,3,opt,name=strategy,proto3" json:"strategy,omitempty"`
  285. StrategySettings *anypb.Any `protobuf:"bytes,4,opt,name=strategy_settings,json=strategySettings,proto3" json:"strategy_settings,omitempty"`
  286. FallbackTag string `protobuf:"bytes,5,opt,name=fallback_tag,json=fallbackTag,proto3" json:"fallback_tag,omitempty"`
  287. }
  288. func (x *BalancingRule) Reset() {
  289. *x = BalancingRule{}
  290. if protoimpl.UnsafeEnabled {
  291. mi := &file_app_router_config_proto_msgTypes[1]
  292. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  293. ms.StoreMessageInfo(mi)
  294. }
  295. }
  296. func (x *BalancingRule) String() string {
  297. return protoimpl.X.MessageStringOf(x)
  298. }
  299. func (*BalancingRule) ProtoMessage() {}
  300. func (x *BalancingRule) ProtoReflect() protoreflect.Message {
  301. mi := &file_app_router_config_proto_msgTypes[1]
  302. if protoimpl.UnsafeEnabled && x != nil {
  303. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  304. if ms.LoadMessageInfo() == nil {
  305. ms.StoreMessageInfo(mi)
  306. }
  307. return ms
  308. }
  309. return mi.MessageOf(x)
  310. }
  311. // Deprecated: Use BalancingRule.ProtoReflect.Descriptor instead.
  312. func (*BalancingRule) Descriptor() ([]byte, []int) {
  313. return file_app_router_config_proto_rawDescGZIP(), []int{1}
  314. }
  315. func (x *BalancingRule) GetTag() string {
  316. if x != nil {
  317. return x.Tag
  318. }
  319. return ""
  320. }
  321. func (x *BalancingRule) GetOutboundSelector() []string {
  322. if x != nil {
  323. return x.OutboundSelector
  324. }
  325. return nil
  326. }
  327. func (x *BalancingRule) GetStrategy() string {
  328. if x != nil {
  329. return x.Strategy
  330. }
  331. return ""
  332. }
  333. func (x *BalancingRule) GetStrategySettings() *anypb.Any {
  334. if x != nil {
  335. return x.StrategySettings
  336. }
  337. return nil
  338. }
  339. func (x *BalancingRule) GetFallbackTag() string {
  340. if x != nil {
  341. return x.FallbackTag
  342. }
  343. return ""
  344. }
  345. type StrategyWeight struct {
  346. state protoimpl.MessageState
  347. sizeCache protoimpl.SizeCache
  348. unknownFields protoimpl.UnknownFields
  349. Regexp bool `protobuf:"varint,1,opt,name=regexp,proto3" json:"regexp,omitempty"`
  350. Match string `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"`
  351. Value float32 `protobuf:"fixed32,3,opt,name=value,proto3" json:"value,omitempty"`
  352. }
  353. func (x *StrategyWeight) Reset() {
  354. *x = StrategyWeight{}
  355. if protoimpl.UnsafeEnabled {
  356. mi := &file_app_router_config_proto_msgTypes[2]
  357. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  358. ms.StoreMessageInfo(mi)
  359. }
  360. }
  361. func (x *StrategyWeight) String() string {
  362. return protoimpl.X.MessageStringOf(x)
  363. }
  364. func (*StrategyWeight) ProtoMessage() {}
  365. func (x *StrategyWeight) ProtoReflect() protoreflect.Message {
  366. mi := &file_app_router_config_proto_msgTypes[2]
  367. if protoimpl.UnsafeEnabled && x != nil {
  368. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  369. if ms.LoadMessageInfo() == nil {
  370. ms.StoreMessageInfo(mi)
  371. }
  372. return ms
  373. }
  374. return mi.MessageOf(x)
  375. }
  376. // Deprecated: Use StrategyWeight.ProtoReflect.Descriptor instead.
  377. func (*StrategyWeight) Descriptor() ([]byte, []int) {
  378. return file_app_router_config_proto_rawDescGZIP(), []int{2}
  379. }
  380. func (x *StrategyWeight) GetRegexp() bool {
  381. if x != nil {
  382. return x.Regexp
  383. }
  384. return false
  385. }
  386. func (x *StrategyWeight) GetMatch() string {
  387. if x != nil {
  388. return x.Match
  389. }
  390. return ""
  391. }
  392. func (x *StrategyWeight) GetValue() float32 {
  393. if x != nil {
  394. return x.Value
  395. }
  396. return 0
  397. }
  398. type StrategyLeastPingConfig struct {
  399. state protoimpl.MessageState
  400. sizeCache protoimpl.SizeCache
  401. unknownFields protoimpl.UnknownFields
  402. ObserverTag string `protobuf:"bytes,7,opt,name=observer_tag,json=observerTag,proto3" json:"observer_tag,omitempty"`
  403. }
  404. func (x *StrategyLeastPingConfig) Reset() {
  405. *x = StrategyLeastPingConfig{}
  406. if protoimpl.UnsafeEnabled {
  407. mi := &file_app_router_config_proto_msgTypes[3]
  408. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  409. ms.StoreMessageInfo(mi)
  410. }
  411. }
  412. func (x *StrategyLeastPingConfig) String() string {
  413. return protoimpl.X.MessageStringOf(x)
  414. }
  415. func (*StrategyLeastPingConfig) ProtoMessage() {}
  416. func (x *StrategyLeastPingConfig) ProtoReflect() protoreflect.Message {
  417. mi := &file_app_router_config_proto_msgTypes[3]
  418. if protoimpl.UnsafeEnabled && x != nil {
  419. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  420. if ms.LoadMessageInfo() == nil {
  421. ms.StoreMessageInfo(mi)
  422. }
  423. return ms
  424. }
  425. return mi.MessageOf(x)
  426. }
  427. // Deprecated: Use StrategyLeastPingConfig.ProtoReflect.Descriptor instead.
  428. func (*StrategyLeastPingConfig) Descriptor() ([]byte, []int) {
  429. return file_app_router_config_proto_rawDescGZIP(), []int{3}
  430. }
  431. func (x *StrategyLeastPingConfig) GetObserverTag() string {
  432. if x != nil {
  433. return x.ObserverTag
  434. }
  435. return ""
  436. }
  437. type StrategyLeastLoadConfig struct {
  438. state protoimpl.MessageState
  439. sizeCache protoimpl.SizeCache
  440. unknownFields protoimpl.UnknownFields
  441. // weight settings
  442. Costs []*StrategyWeight `protobuf:"bytes,2,rep,name=costs,proto3" json:"costs,omitempty"`
  443. // RTT baselines for selecting, int64 values of time.Duration
  444. Baselines []int64 `protobuf:"varint,3,rep,packed,name=baselines,proto3" json:"baselines,omitempty"`
  445. // expected nodes count to select
  446. Expected int32 `protobuf:"varint,4,opt,name=expected,proto3" json:"expected,omitempty"`
  447. // max acceptable rtt, filter away high delay nodes. defalut 0
  448. MaxRTT int64 `protobuf:"varint,5,opt,name=maxRTT,proto3" json:"maxRTT,omitempty"`
  449. // acceptable failure rate
  450. Tolerance float32 `protobuf:"fixed32,6,opt,name=tolerance,proto3" json:"tolerance,omitempty"`
  451. ObserverTag string `protobuf:"bytes,7,opt,name=observer_tag,json=observerTag,proto3" json:"observer_tag,omitempty"`
  452. }
  453. func (x *StrategyLeastLoadConfig) Reset() {
  454. *x = StrategyLeastLoadConfig{}
  455. if protoimpl.UnsafeEnabled {
  456. mi := &file_app_router_config_proto_msgTypes[4]
  457. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  458. ms.StoreMessageInfo(mi)
  459. }
  460. }
  461. func (x *StrategyLeastLoadConfig) String() string {
  462. return protoimpl.X.MessageStringOf(x)
  463. }
  464. func (*StrategyLeastLoadConfig) ProtoMessage() {}
  465. func (x *StrategyLeastLoadConfig) ProtoReflect() protoreflect.Message {
  466. mi := &file_app_router_config_proto_msgTypes[4]
  467. if protoimpl.UnsafeEnabled && x != nil {
  468. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  469. if ms.LoadMessageInfo() == nil {
  470. ms.StoreMessageInfo(mi)
  471. }
  472. return ms
  473. }
  474. return mi.MessageOf(x)
  475. }
  476. // Deprecated: Use StrategyLeastLoadConfig.ProtoReflect.Descriptor instead.
  477. func (*StrategyLeastLoadConfig) Descriptor() ([]byte, []int) {
  478. return file_app_router_config_proto_rawDescGZIP(), []int{4}
  479. }
  480. func (x *StrategyLeastLoadConfig) GetCosts() []*StrategyWeight {
  481. if x != nil {
  482. return x.Costs
  483. }
  484. return nil
  485. }
  486. func (x *StrategyLeastLoadConfig) GetBaselines() []int64 {
  487. if x != nil {
  488. return x.Baselines
  489. }
  490. return nil
  491. }
  492. func (x *StrategyLeastLoadConfig) GetExpected() int32 {
  493. if x != nil {
  494. return x.Expected
  495. }
  496. return 0
  497. }
  498. func (x *StrategyLeastLoadConfig) GetMaxRTT() int64 {
  499. if x != nil {
  500. return x.MaxRTT
  501. }
  502. return 0
  503. }
  504. func (x *StrategyLeastLoadConfig) GetTolerance() float32 {
  505. if x != nil {
  506. return x.Tolerance
  507. }
  508. return 0
  509. }
  510. func (x *StrategyLeastLoadConfig) GetObserverTag() string {
  511. if x != nil {
  512. return x.ObserverTag
  513. }
  514. return ""
  515. }
  516. type Config struct {
  517. state protoimpl.MessageState
  518. sizeCache protoimpl.SizeCache
  519. unknownFields protoimpl.UnknownFields
  520. DomainStrategy DomainStrategy `protobuf:"varint,1,opt,name=domain_strategy,json=domainStrategy,proto3,enum=v2ray.core.app.router.DomainStrategy" json:"domain_strategy,omitempty"`
  521. Rule []*RoutingRule `protobuf:"bytes,2,rep,name=rule,proto3" json:"rule,omitempty"`
  522. BalancingRule []*BalancingRule `protobuf:"bytes,3,rep,name=balancing_rule,json=balancingRule,proto3" json:"balancing_rule,omitempty"`
  523. }
  524. func (x *Config) Reset() {
  525. *x = Config{}
  526. if protoimpl.UnsafeEnabled {
  527. mi := &file_app_router_config_proto_msgTypes[5]
  528. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  529. ms.StoreMessageInfo(mi)
  530. }
  531. }
  532. func (x *Config) String() string {
  533. return protoimpl.X.MessageStringOf(x)
  534. }
  535. func (*Config) ProtoMessage() {}
  536. func (x *Config) ProtoReflect() protoreflect.Message {
  537. mi := &file_app_router_config_proto_msgTypes[5]
  538. if protoimpl.UnsafeEnabled && x != nil {
  539. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  540. if ms.LoadMessageInfo() == nil {
  541. ms.StoreMessageInfo(mi)
  542. }
  543. return ms
  544. }
  545. return mi.MessageOf(x)
  546. }
  547. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  548. func (*Config) Descriptor() ([]byte, []int) {
  549. return file_app_router_config_proto_rawDescGZIP(), []int{5}
  550. }
  551. func (x *Config) GetDomainStrategy() DomainStrategy {
  552. if x != nil {
  553. return x.DomainStrategy
  554. }
  555. return DomainStrategy_AsIs
  556. }
  557. func (x *Config) GetRule() []*RoutingRule {
  558. if x != nil {
  559. return x.Rule
  560. }
  561. return nil
  562. }
  563. func (x *Config) GetBalancingRule() []*BalancingRule {
  564. if x != nil {
  565. return x.BalancingRule
  566. }
  567. return nil
  568. }
  569. type SimplifiedConfig struct {
  570. state protoimpl.MessageState
  571. sizeCache protoimpl.SizeCache
  572. unknownFields protoimpl.UnknownFields
  573. DomainStrategy DomainStrategy `protobuf:"varint,1,opt,name=domain_strategy,json=domainStrategy,proto3,enum=v2ray.core.app.router.DomainStrategy" json:"domain_strategy,omitempty"`
  574. Rule []*RoutingRule `protobuf:"bytes,2,rep,name=rule,proto3" json:"rule,omitempty"`
  575. BalancingRule []*BalancingRule `protobuf:"bytes,3,rep,name=balancing_rule,json=balancingRule,proto3" json:"balancing_rule,omitempty"`
  576. }
  577. func (x *SimplifiedConfig) Reset() {
  578. *x = SimplifiedConfig{}
  579. if protoimpl.UnsafeEnabled {
  580. mi := &file_app_router_config_proto_msgTypes[6]
  581. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  582. ms.StoreMessageInfo(mi)
  583. }
  584. }
  585. func (x *SimplifiedConfig) String() string {
  586. return protoimpl.X.MessageStringOf(x)
  587. }
  588. func (*SimplifiedConfig) ProtoMessage() {}
  589. func (x *SimplifiedConfig) ProtoReflect() protoreflect.Message {
  590. mi := &file_app_router_config_proto_msgTypes[6]
  591. if protoimpl.UnsafeEnabled && 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 SimplifiedConfig.ProtoReflect.Descriptor instead.
  601. func (*SimplifiedConfig) Descriptor() ([]byte, []int) {
  602. return file_app_router_config_proto_rawDescGZIP(), []int{6}
  603. }
  604. func (x *SimplifiedConfig) GetDomainStrategy() DomainStrategy {
  605. if x != nil {
  606. return x.DomainStrategy
  607. }
  608. return DomainStrategy_AsIs
  609. }
  610. func (x *SimplifiedConfig) GetRule() []*RoutingRule {
  611. if x != nil {
  612. return x.Rule
  613. }
  614. return nil
  615. }
  616. func (x *SimplifiedConfig) GetBalancingRule() []*BalancingRule {
  617. if x != nil {
  618. return x.BalancingRule
  619. }
  620. return nil
  621. }
  622. var File_app_router_config_proto protoreflect.FileDescriptor
  623. var file_app_router_config_proto_rawDesc = []byte{
  624. 0x0a, 0x17, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e,
  625. 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79,
  626. 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
  627. 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
  628. 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x6f, 0x6d,
  629. 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f,
  630. 0x74, 0x6f, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e,
  631. 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x63, 0x6f,
  632. 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x78, 0x74, 0x2f, 0x65, 0x78,
  633. 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24,
  634. 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65,
  635. 0x72, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
  636. 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x08, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67,
  637. 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
  638. 0x09, 0x48, 0x00, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x25, 0x0a, 0x0d, 0x62, 0x61, 0x6c, 0x61,
  639. 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48,
  640. 0x00, 0x52, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x12,
  641. 0x42, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
  642. 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70,
  643. 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x63, 0x6f,
  644. 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x64, 0x6f, 0x6d,
  645. 0x61, 0x69, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28,
  646. 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61,
  647. 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
  648. 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x42, 0x02, 0x18, 0x01, 0x52,
  649. 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, 0x3f, 0x0a, 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18, 0x0a,
  650. 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
  651. 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x6f, 0x75,
  652. 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50, 0x52,
  653. 0x05, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x12, 0x43, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72,
  654. 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72,
  655. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e,
  656. 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x02, 0x18, 0x01,
  657. 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70,
  658. 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
  659. 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
  660. 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52,
  661. 0x08, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x6e, 0x65, 0x74,
  662. 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
  663. 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
  664. 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c,
  665. 0x69, 0x73, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
  666. 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73,
  667. 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63,
  668. 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e,
  669. 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73,
  670. 0x12, 0x4d, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x18,
  671. 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f,
  672. 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x6f,
  673. 0x75, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x42,
  674. 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x69, 0x64, 0x72, 0x12,
  675. 0x4c, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6f, 0x69, 0x70, 0x18,
  676. 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f,
  677. 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x6f,
  678. 0x75, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6f, 0x49, 0x50,
  679. 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6f, 0x69, 0x70, 0x12, 0x49, 0x0a,
  680. 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73,
  681. 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e,
  682. 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e,
  683. 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
  684. 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72,
  685. 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73,
  686. 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x75,
  687. 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e,
  688. 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74,
  689. 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74,
  690. 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
  691. 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
  692. 0x75, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d,
  693. 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x6f,
  694. 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x0a, 0x67,
  695. 0x65, 0x6f, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0xa1, 0x93, 0x04, 0x20, 0x03, 0x28,
  696. 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61,
  697. 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
  698. 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6f, 0x53, 0x69, 0x74, 0x65, 0x52, 0x09,
  699. 0x67, 0x65, 0x6f, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, 0x74, 0x61, 0x72,
  700. 0x67, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x22, 0xd0, 0x01, 0x0a, 0x0d, 0x42, 0x61, 0x6c, 0x61,
  701. 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67,
  702. 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x6f,
  703. 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72,
  704. 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64,
  705. 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61,
  706. 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x61,
  707. 0x74, 0x65, 0x67, 0x79, 0x12, 0x41, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79,
  708. 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
  709. 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
  710. 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x10, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x53,
  711. 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x6c, 0x6c, 0x62,
  712. 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66,
  713. 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x54, 0x61, 0x67, 0x22, 0x54, 0x0a, 0x0e, 0x53, 0x74,
  714. 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06,
  715. 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65,
  716. 0x67, 0x65, 0x78, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20,
  717. 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
  718. 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
  719. 0x22, 0x3c, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x4c, 0x65, 0x61, 0x73,
  720. 0x74, 0x50, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x6f,
  721. 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28,
  722. 0x09, 0x52, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x61, 0x67, 0x22, 0xe9,
  723. 0x01, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x4c, 0x65, 0x61, 0x73, 0x74,
  724. 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x05, 0x63, 0x6f,
  725. 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x32, 0x72, 0x61,
  726. 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65,
  727. 0x72, 0x2e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74,
  728. 0x52, 0x05, 0x63, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x6c,
  729. 0x69, 0x6e, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65,
  730. 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65,
  731. 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65,
  732. 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x52, 0x54, 0x54, 0x18, 0x05, 0x20, 0x01, 0x28,
  733. 0x03, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x52, 0x54, 0x54, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x6c,
  734. 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x74, 0x6f,
  735. 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x62, 0x73, 0x65, 0x72,
  736. 0x76, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f,
  737. 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x61, 0x67, 0x22, 0xdd, 0x01, 0x0a, 0x06, 0x43,
  738. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f,
  739. 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25,
  740. 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e,
  741. 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72,
  742. 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72,
  743. 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x36, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20,
  744. 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65,
  745. 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x75, 0x74,
  746. 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a,
  747. 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x18,
  748. 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f,
  749. 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x42, 0x61,
  750. 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x62, 0x61, 0x6c,
  751. 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x82, 0x02, 0x0a, 0x10, 0x53,
  752. 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
  753. 0x4e, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65,
  754. 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79,
  755. 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
  756. 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52,
  757. 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12,
  758. 0x36, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e,
  759. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72,
  760. 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c,
  761. 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e,
  762. 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
  763. 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70,
  764. 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
  765. 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67,
  766. 0x52, 0x75, 0x6c, 0x65, 0x3a, 0x19, 0x82, 0xb5, 0x18, 0x09, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76,
  767. 0x69, 0x63, 0x65, 0x82, 0xb5, 0x18, 0x08, 0x12, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2a,
  768. 0x47, 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67,
  769. 0x79, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x73, 0x49, 0x73, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55,
  770. 0x73, 0x65, 0x49, 0x70, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x70, 0x49, 0x66, 0x4e, 0x6f,
  771. 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x70, 0x4f, 0x6e,
  772. 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x10, 0x03, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e,
  773. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72,
  774. 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
  775. 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d,
  776. 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74,
  777. 0x65, 0x72, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e,
  778. 0x41, 0x70, 0x70, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
  779. 0x6f, 0x33,
  780. }
  781. var (
  782. file_app_router_config_proto_rawDescOnce sync.Once
  783. file_app_router_config_proto_rawDescData = file_app_router_config_proto_rawDesc
  784. )
  785. func file_app_router_config_proto_rawDescGZIP() []byte {
  786. file_app_router_config_proto_rawDescOnce.Do(func() {
  787. file_app_router_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_router_config_proto_rawDescData)
  788. })
  789. return file_app_router_config_proto_rawDescData
  790. }
  791. var file_app_router_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  792. var file_app_router_config_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
  793. var file_app_router_config_proto_goTypes = []interface{}{
  794. (DomainStrategy)(0), // 0: v2ray.core.app.router.DomainStrategy
  795. (*RoutingRule)(nil), // 1: v2ray.core.app.router.RoutingRule
  796. (*BalancingRule)(nil), // 2: v2ray.core.app.router.BalancingRule
  797. (*StrategyWeight)(nil), // 3: v2ray.core.app.router.StrategyWeight
  798. (*StrategyLeastPingConfig)(nil), // 4: v2ray.core.app.router.StrategyLeastPingConfig
  799. (*StrategyLeastLoadConfig)(nil), // 5: v2ray.core.app.router.StrategyLeastLoadConfig
  800. (*Config)(nil), // 6: v2ray.core.app.router.Config
  801. (*SimplifiedConfig)(nil), // 7: v2ray.core.app.router.SimplifiedConfig
  802. (*routercommon.Domain)(nil), // 8: v2ray.core.app.router.routercommon.Domain
  803. (*routercommon.CIDR)(nil), // 9: v2ray.core.app.router.routercommon.CIDR
  804. (*routercommon.GeoIP)(nil), // 10: v2ray.core.app.router.routercommon.GeoIP
  805. (*net.PortRange)(nil), // 11: v2ray.core.common.net.PortRange
  806. (*net.PortList)(nil), // 12: v2ray.core.common.net.PortList
  807. (*net.NetworkList)(nil), // 13: v2ray.core.common.net.NetworkList
  808. (net.Network)(0), // 14: v2ray.core.common.net.Network
  809. (*routercommon.GeoSite)(nil), // 15: v2ray.core.app.router.routercommon.GeoSite
  810. (*anypb.Any)(nil), // 16: google.protobuf.Any
  811. }
  812. var file_app_router_config_proto_depIdxs = []int32{
  813. 8, // 0: v2ray.core.app.router.RoutingRule.domain:type_name -> v2ray.core.app.router.routercommon.Domain
  814. 9, // 1: v2ray.core.app.router.RoutingRule.cidr:type_name -> v2ray.core.app.router.routercommon.CIDR
  815. 10, // 2: v2ray.core.app.router.RoutingRule.geoip:type_name -> v2ray.core.app.router.routercommon.GeoIP
  816. 11, // 3: v2ray.core.app.router.RoutingRule.port_range:type_name -> v2ray.core.common.net.PortRange
  817. 12, // 4: v2ray.core.app.router.RoutingRule.port_list:type_name -> v2ray.core.common.net.PortList
  818. 13, // 5: v2ray.core.app.router.RoutingRule.network_list:type_name -> v2ray.core.common.net.NetworkList
  819. 14, // 6: v2ray.core.app.router.RoutingRule.networks:type_name -> v2ray.core.common.net.Network
  820. 9, // 7: v2ray.core.app.router.RoutingRule.source_cidr:type_name -> v2ray.core.app.router.routercommon.CIDR
  821. 10, // 8: v2ray.core.app.router.RoutingRule.source_geoip:type_name -> v2ray.core.app.router.routercommon.GeoIP
  822. 12, // 9: v2ray.core.app.router.RoutingRule.source_port_list:type_name -> v2ray.core.common.net.PortList
  823. 15, // 10: v2ray.core.app.router.RoutingRule.geo_domain:type_name -> v2ray.core.app.router.routercommon.GeoSite
  824. 16, // 11: v2ray.core.app.router.BalancingRule.strategy_settings:type_name -> google.protobuf.Any
  825. 3, // 12: v2ray.core.app.router.StrategyLeastLoadConfig.costs:type_name -> v2ray.core.app.router.StrategyWeight
  826. 0, // 13: v2ray.core.app.router.Config.domain_strategy:type_name -> v2ray.core.app.router.DomainStrategy
  827. 1, // 14: v2ray.core.app.router.Config.rule:type_name -> v2ray.core.app.router.RoutingRule
  828. 2, // 15: v2ray.core.app.router.Config.balancing_rule:type_name -> v2ray.core.app.router.BalancingRule
  829. 0, // 16: v2ray.core.app.router.SimplifiedConfig.domain_strategy:type_name -> v2ray.core.app.router.DomainStrategy
  830. 1, // 17: v2ray.core.app.router.SimplifiedConfig.rule:type_name -> v2ray.core.app.router.RoutingRule
  831. 2, // 18: v2ray.core.app.router.SimplifiedConfig.balancing_rule:type_name -> v2ray.core.app.router.BalancingRule
  832. 19, // [19:19] is the sub-list for method output_type
  833. 19, // [19:19] is the sub-list for method input_type
  834. 19, // [19:19] is the sub-list for extension type_name
  835. 19, // [19:19] is the sub-list for extension extendee
  836. 0, // [0:19] is the sub-list for field type_name
  837. }
  838. func init() { file_app_router_config_proto_init() }
  839. func file_app_router_config_proto_init() {
  840. if File_app_router_config_proto != nil {
  841. return
  842. }
  843. if !protoimpl.UnsafeEnabled {
  844. file_app_router_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  845. switch v := v.(*RoutingRule); i {
  846. case 0:
  847. return &v.state
  848. case 1:
  849. return &v.sizeCache
  850. case 2:
  851. return &v.unknownFields
  852. default:
  853. return nil
  854. }
  855. }
  856. file_app_router_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  857. switch v := v.(*BalancingRule); i {
  858. case 0:
  859. return &v.state
  860. case 1:
  861. return &v.sizeCache
  862. case 2:
  863. return &v.unknownFields
  864. default:
  865. return nil
  866. }
  867. }
  868. file_app_router_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  869. switch v := v.(*StrategyWeight); i {
  870. case 0:
  871. return &v.state
  872. case 1:
  873. return &v.sizeCache
  874. case 2:
  875. return &v.unknownFields
  876. default:
  877. return nil
  878. }
  879. }
  880. file_app_router_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  881. switch v := v.(*StrategyLeastPingConfig); i {
  882. case 0:
  883. return &v.state
  884. case 1:
  885. return &v.sizeCache
  886. case 2:
  887. return &v.unknownFields
  888. default:
  889. return nil
  890. }
  891. }
  892. file_app_router_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  893. switch v := v.(*StrategyLeastLoadConfig); i {
  894. case 0:
  895. return &v.state
  896. case 1:
  897. return &v.sizeCache
  898. case 2:
  899. return &v.unknownFields
  900. default:
  901. return nil
  902. }
  903. }
  904. file_app_router_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
  905. switch v := v.(*Config); i {
  906. case 0:
  907. return &v.state
  908. case 1:
  909. return &v.sizeCache
  910. case 2:
  911. return &v.unknownFields
  912. default:
  913. return nil
  914. }
  915. }
  916. file_app_router_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
  917. switch v := v.(*SimplifiedConfig); i {
  918. case 0:
  919. return &v.state
  920. case 1:
  921. return &v.sizeCache
  922. case 2:
  923. return &v.unknownFields
  924. default:
  925. return nil
  926. }
  927. }
  928. }
  929. file_app_router_config_proto_msgTypes[0].OneofWrappers = []interface{}{
  930. (*RoutingRule_Tag)(nil),
  931. (*RoutingRule_BalancingTag)(nil),
  932. }
  933. type x struct{}
  934. out := protoimpl.TypeBuilder{
  935. File: protoimpl.DescBuilder{
  936. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  937. RawDescriptor: file_app_router_config_proto_rawDesc,
  938. NumEnums: 1,
  939. NumMessages: 7,
  940. NumExtensions: 0,
  941. NumServices: 0,
  942. },
  943. GoTypes: file_app_router_config_proto_goTypes,
  944. DependencyIndexes: file_app_router_config_proto_depIdxs,
  945. EnumInfos: file_app_router_config_proto_enumTypes,
  946. MessageInfos: file_app_router_config_proto_msgTypes,
  947. }.Build()
  948. File_app_router_config_proto = out.File
  949. file_app_router_config_proto_rawDesc = nil
  950. file_app_router_config_proto_goTypes = nil
  951. file_app_router_config_proto_depIdxs = nil
  952. }