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