Versions in this module Expand all Collapse all v4 v4.41.0 Jun 24, 2021 Changes in this version + var Config_DomainStrategy_name = map[int32]string + var Config_DomainStrategy_value = map[string]int32 + var Domain_Type_name = map[int32]string + var Domain_Type_value = map[string]int32 + var File_app_router_config_proto protoreflect.FileDescriptor + type AttributeMatcher struct + func NewAttributeMatcher(code string) (*AttributeMatcher, error) + func (m *AttributeMatcher) Apply(ctx routing.Context) bool + func (m *AttributeMatcher) Match(attrs map[string]string) bool + type Balancer struct + func (b *Balancer) InjectContext(ctx context.Context) + func (b *Balancer) PickOutbound() (string, error) + type BalancingRule struct + OutboundSelector []string + Strategy string + Tag string + func (*BalancingRule) Descriptor() ([]byte, []int) + func (*BalancingRule) ProtoMessage() + func (br *BalancingRule) Build(ohm outbound.Manager) (*Balancer, error) + func (x *BalancingRule) GetOutboundSelector() []string + func (x *BalancingRule) GetStrategy() string + func (x *BalancingRule) GetTag() string + func (x *BalancingRule) ProtoReflect() protoreflect.Message + func (x *BalancingRule) Reset() + func (x *BalancingRule) String() string + type BalancingStrategy interface + PickOutbound func([]string) string + type CIDR struct + Ip []byte + Prefix uint32 + func (*CIDR) Descriptor() ([]byte, []int) + func (*CIDR) ProtoMessage() + func (x *CIDR) GetIp() []byte + func (x *CIDR) GetPrefix() uint32 + func (x *CIDR) ProtoReflect() protoreflect.Message + func (x *CIDR) Reset() + func (x *CIDR) String() string + type CIDRList []*CIDR + func (l *CIDRList) Len() int + func (l *CIDRList) Less(i int, j int) bool + func (l *CIDRList) Swap(i int, j int) + type Condition interface + Apply func(ctx routing.Context) bool + type ConditionChan []Condition + func NewConditionChan() *ConditionChan + func (v *ConditionChan) Add(cond Condition) *ConditionChan + func (v *ConditionChan) Apply(ctx routing.Context) bool + func (v *ConditionChan) Len() int + type Config struct + BalancingRule []*BalancingRule + DomainStrategy Config_DomainStrategy + Rule []*RoutingRule + func (*Config) Descriptor() ([]byte, []int) + func (*Config) ProtoMessage() + func (x *Config) GetBalancingRule() []*BalancingRule + func (x *Config) GetDomainStrategy() Config_DomainStrategy + func (x *Config) GetRule() []*RoutingRule + func (x *Config) ProtoReflect() protoreflect.Message + func (x *Config) Reset() + func (x *Config) String() string + type Config_DomainStrategy int32 + const Config_AsIs + const Config_IpIfNonMatch + const Config_IpOnDemand + const Config_UseIp + func (Config_DomainStrategy) Descriptor() protoreflect.EnumDescriptor + func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int) + func (Config_DomainStrategy) Type() protoreflect.EnumType + func (x Config_DomainStrategy) Enum() *Config_DomainStrategy + func (x Config_DomainStrategy) Number() protoreflect.EnumNumber + func (x Config_DomainStrategy) String() string + type Domain struct + Attribute []*Domain_Attribute + Type Domain_Type + Value string + func (*Domain) Descriptor() ([]byte, []int) + func (*Domain) ProtoMessage() + func (x *Domain) GetAttribute() []*Domain_Attribute + func (x *Domain) GetType() Domain_Type + func (x *Domain) GetValue() string + func (x *Domain) ProtoReflect() protoreflect.Message + func (x *Domain) Reset() + func (x *Domain) String() string + type DomainMatcher struct + func NewDomainMatcher(domains []*Domain) (*DomainMatcher, error) + func NewMphMatcherGroup(domains []*Domain) (*DomainMatcher, error) + func (m *DomainMatcher) Apply(ctx routing.Context) bool + func (m *DomainMatcher) ApplyDomain(domain string) bool + type Domain_Attribute struct + Key string + TypedValue isDomain_Attribute_TypedValue + func (*Domain_Attribute) Descriptor() ([]byte, []int) + func (*Domain_Attribute) ProtoMessage() + func (m *Domain_Attribute) GetTypedValue() isDomain_Attribute_TypedValue + func (x *Domain_Attribute) GetBoolValue() bool + func (x *Domain_Attribute) GetIntValue() int64 + func (x *Domain_Attribute) GetKey() string + func (x *Domain_Attribute) ProtoReflect() protoreflect.Message + func (x *Domain_Attribute) Reset() + func (x *Domain_Attribute) String() string + type Domain_Attribute_BoolValue struct + BoolValue bool + type Domain_Attribute_IntValue struct + IntValue int64 + type Domain_Type int32 + const Domain_Domain + const Domain_Full + const Domain_Plain + const Domain_Regex + func (Domain_Type) Descriptor() protoreflect.EnumDescriptor + func (Domain_Type) EnumDescriptor() ([]byte, []int) + func (Domain_Type) Type() protoreflect.EnumType + func (x Domain_Type) Enum() *Domain_Type + func (x Domain_Type) Number() protoreflect.EnumNumber + func (x Domain_Type) String() string + type GeoIP struct + Cidr []*CIDR + CountryCode string + ReverseMatch bool + func (*GeoIP) Descriptor() ([]byte, []int) + func (*GeoIP) ProtoMessage() + func (x *GeoIP) GetCidr() []*CIDR + func (x *GeoIP) GetCountryCode() string + func (x *GeoIP) GetReverseMatch() bool + func (x *GeoIP) ProtoReflect() protoreflect.Message + func (x *GeoIP) Reset() + func (x *GeoIP) String() string + type GeoIPList struct + Entry []*GeoIP + func (*GeoIPList) Descriptor() ([]byte, []int) + func (*GeoIPList) ProtoMessage() + func (x *GeoIPList) GetEntry() []*GeoIP + func (x *GeoIPList) ProtoReflect() protoreflect.Message + func (x *GeoIPList) Reset() + func (x *GeoIPList) String() string + type GeoIPMatcher struct + func (m *GeoIPMatcher) Init(cidrs []*CIDR) error + func (m *GeoIPMatcher) Match(ip net.IP) bool + func (m *GeoIPMatcher) SetReverseMatch(isReverseMatch bool) + type GeoIPMatcherContainer struct + func (c *GeoIPMatcherContainer) Add(geoip *GeoIP) (*GeoIPMatcher, error) + type GeoSite struct + CountryCode string + Domain []*Domain + func (*GeoSite) Descriptor() ([]byte, []int) + func (*GeoSite) ProtoMessage() + func (x *GeoSite) GetCountryCode() string + func (x *GeoSite) GetDomain() []*Domain + func (x *GeoSite) ProtoReflect() protoreflect.Message + func (x *GeoSite) Reset() + func (x *GeoSite) String() string + type GeoSiteList struct + Entry []*GeoSite + func (*GeoSiteList) Descriptor() ([]byte, []int) + func (*GeoSiteList) ProtoMessage() + func (x *GeoSiteList) GetEntry() []*GeoSite + func (x *GeoSiteList) ProtoReflect() protoreflect.Message + func (x *GeoSiteList) Reset() + func (x *GeoSiteList) String() string + type InboundTagMatcher struct + func NewInboundTagMatcher(tags []string) *InboundTagMatcher + func (v *InboundTagMatcher) Apply(ctx routing.Context) bool + type LeastPingStrategy struct + func (l *LeastPingStrategy) InjectContext(ctx context.Context) + func (l *LeastPingStrategy) PickOutbound(strings []string) string + type MultiGeoIPMatcher struct + func NewMultiGeoIPMatcher(geoips []*GeoIP, onSource bool) (*MultiGeoIPMatcher, error) + func (m *MultiGeoIPMatcher) Apply(ctx routing.Context) bool + type NetworkMatcher struct + func NewNetworkMatcher(network []net.Network) NetworkMatcher + func (v NetworkMatcher) Apply(ctx routing.Context) bool + type PortMatcher struct + func NewPortMatcher(list *net.PortList, onSource bool) *PortMatcher + func (v *PortMatcher) Apply(ctx routing.Context) bool + type ProtocolMatcher struct + func NewProtocolMatcher(protocols []string) *ProtocolMatcher + func (m *ProtocolMatcher) Apply(ctx routing.Context) bool + type RandomStrategy struct + func (s *RandomStrategy) PickOutbound(tags []string) string + type Route struct + func (r *Route) GetOutboundGroupTags() []string + func (r *Route) GetOutboundTag() string + type Router struct + func (*Router) Close() error + func (*Router) Start() error + func (*Router) Type() interface{} + func (r *Router) Init(ctx context.Context, config *Config, d dns.Client, ohm outbound.Manager) error + func (r *Router) PickRoute(ctx routing.Context) (routing.Route, error) + type RoutingRule struct + Attributes string + Cidr []*CIDR + Domain []*Domain + DomainMatcher string + Geoip []*GeoIP + InboundTag []string + NetworkList *net.NetworkList + Networks []net.Network + PortList *net.PortList + PortRange *net.PortRange + Protocol []string + SourceCidr []*CIDR + SourceGeoip []*GeoIP + SourcePortList *net.PortList + TargetTag isRoutingRule_TargetTag + UserEmail []string + func (*RoutingRule) Descriptor() ([]byte, []int) + func (*RoutingRule) ProtoMessage() + func (m *RoutingRule) GetTargetTag() isRoutingRule_TargetTag + func (rr *RoutingRule) BuildCondition() (Condition, error) + func (x *RoutingRule) GetAttributes() string + func (x *RoutingRule) GetBalancingTag() string + func (x *RoutingRule) GetCidr() []*CIDR + func (x *RoutingRule) GetDomain() []*Domain + func (x *RoutingRule) GetDomainMatcher() string + func (x *RoutingRule) GetGeoip() []*GeoIP + func (x *RoutingRule) GetInboundTag() []string + func (x *RoutingRule) GetNetworkList() *net.NetworkList + func (x *RoutingRule) GetNetworks() []net.Network + func (x *RoutingRule) GetPortList() *net.PortList + func (x *RoutingRule) GetPortRange() *net.PortRange + func (x *RoutingRule) GetProtocol() []string + func (x *RoutingRule) GetSourceCidr() []*CIDR + func (x *RoutingRule) GetSourceGeoip() []*GeoIP + func (x *RoutingRule) GetSourcePortList() *net.PortList + func (x *RoutingRule) GetTag() string + func (x *RoutingRule) GetUserEmail() []string + func (x *RoutingRule) ProtoReflect() protoreflect.Message + func (x *RoutingRule) Reset() + func (x *RoutingRule) String() string + type RoutingRule_BalancingTag struct + BalancingTag string + type RoutingRule_Tag struct + Tag string + type Rule struct + Balancer *Balancer + Condition Condition + Tag string + func (r *Rule) Apply(ctx routing.Context) bool + func (r *Rule) GetTag() (string, error) + type UserMatcher struct + func NewUserMatcher(users []string) *UserMatcher + func (v *UserMatcher) Apply(ctx routing.Context) bool