Versions in this module Expand all Collapse all v4 v4.23.2 Apr 17, 2020 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 + type AttributeMatcher struct + func NewAttributeMatcher(code string) (*AttributeMatcher, error) + func (m *AttributeMatcher) Apply(ctx *Context) bool + func (m *AttributeMatcher) Match(attrs map[string]interface{}) bool + type Balancer struct + func (b *Balancer) PickOutbound() (string, error) + type BalancingRule struct + OutboundSelector []string + Tag string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*BalancingRule) Descriptor() ([]byte, []int) + func (*BalancingRule) ProtoMessage() + func (br *BalancingRule) Build(ohm outbound.Manager) (*Balancer, error) + func (m *BalancingRule) GetOutboundSelector() []string + func (m *BalancingRule) GetTag() string + func (m *BalancingRule) Reset() + func (m *BalancingRule) String() string + func (m *BalancingRule) XXX_DiscardUnknown() + func (m *BalancingRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *BalancingRule) XXX_Merge(src proto.Message) + func (m *BalancingRule) XXX_Size() int + func (m *BalancingRule) XXX_Unmarshal(b []byte) error + type BalancingStrategy interface + PickOutbound func([]string) string + type CIDR struct + Ip []byte + Prefix uint32 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*CIDR) Descriptor() ([]byte, []int) + func (*CIDR) ProtoMessage() + func (m *CIDR) GetIp() []byte + func (m *CIDR) GetPrefix() uint32 + func (m *CIDR) Reset() + func (m *CIDR) String() string + func (m *CIDR) XXX_DiscardUnknown() + func (m *CIDR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CIDR) XXX_Merge(src proto.Message) + func (m *CIDR) XXX_Size() int + func (m *CIDR) XXX_Unmarshal(b []byte) error + 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 *Context) bool + type ConditionChan []Condition + func NewConditionChan() *ConditionChan + func (v *ConditionChan) Add(cond Condition) *ConditionChan + func (v *ConditionChan) Apply(ctx *Context) bool + func (v *ConditionChan) Len() int + type Config struct + BalancingRule []*BalancingRule + DomainStrategy Config_DomainStrategy + Rule []*RoutingRule + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Config) Descriptor() ([]byte, []int) + func (*Config) ProtoMessage() + func (m *Config) GetBalancingRule() []*BalancingRule + func (m *Config) GetDomainStrategy() Config_DomainStrategy + func (m *Config) GetRule() []*RoutingRule + func (m *Config) Reset() + func (m *Config) String() string + func (m *Config) XXX_DiscardUnknown() + func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Config) XXX_Merge(src proto.Message) + func (m *Config) XXX_Size() int + func (m *Config) XXX_Unmarshal(b []byte) error + type Config_DomainStrategy int32 + const Config_AsIs + const Config_IpIfNonMatch + const Config_IpOnDemand + const Config_UseIp + func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int) + func (x Config_DomainStrategy) String() string + type Context struct + Content *session.Content + Inbound *session.Inbound + Outbound *session.Outbound + func (c *Context) GetTargetIPs() []net.IP + type Domain struct + Attribute []*Domain_Attribute + Type Domain_Type + Value string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Domain) Descriptor() ([]byte, []int) + func (*Domain) ProtoMessage() + func (m *Domain) GetAttribute() []*Domain_Attribute + func (m *Domain) GetType() Domain_Type + func (m *Domain) GetValue() string + func (m *Domain) Reset() + func (m *Domain) String() string + func (m *Domain) XXX_DiscardUnknown() + func (m *Domain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Domain) XXX_Merge(src proto.Message) + func (m *Domain) XXX_Size() int + func (m *Domain) XXX_Unmarshal(b []byte) error + type DomainMatcher struct + func NewDomainMatcher(domains []*Domain) (*DomainMatcher, error) + func (m *DomainMatcher) Apply(ctx *Context) bool + func (m *DomainMatcher) ApplyDomain(domain string) bool + type Domain_Attribute struct + Key string + TypedValue isDomain_Attribute_TypedValue + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Domain_Attribute) Descriptor() ([]byte, []int) + func (*Domain_Attribute) ProtoMessage() + func (*Domain_Attribute) XXX_OneofWrappers() []interface{} + func (m *Domain_Attribute) GetBoolValue() bool + func (m *Domain_Attribute) GetIntValue() int64 + func (m *Domain_Attribute) GetKey() string + func (m *Domain_Attribute) GetTypedValue() isDomain_Attribute_TypedValue + func (m *Domain_Attribute) Reset() + func (m *Domain_Attribute) String() string + func (m *Domain_Attribute) XXX_DiscardUnknown() + func (m *Domain_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Domain_Attribute) XXX_Merge(src proto.Message) + func (m *Domain_Attribute) XXX_Size() int + func (m *Domain_Attribute) XXX_Unmarshal(b []byte) error + 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) EnumDescriptor() ([]byte, []int) + func (x Domain_Type) String() string + type GeoIP struct + Cidr []*CIDR + CountryCode string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*GeoIP) Descriptor() ([]byte, []int) + func (*GeoIP) ProtoMessage() + func (m *GeoIP) GetCidr() []*CIDR + func (m *GeoIP) GetCountryCode() string + func (m *GeoIP) Reset() + func (m *GeoIP) String() string + func (m *GeoIP) XXX_DiscardUnknown() + func (m *GeoIP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *GeoIP) XXX_Merge(src proto.Message) + func (m *GeoIP) XXX_Size() int + func (m *GeoIP) XXX_Unmarshal(b []byte) error + type GeoIPList struct + Entry []*GeoIP + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*GeoIPList) Descriptor() ([]byte, []int) + func (*GeoIPList) ProtoMessage() + func (m *GeoIPList) GetEntry() []*GeoIP + func (m *GeoIPList) Reset() + func (m *GeoIPList) String() string + func (m *GeoIPList) XXX_DiscardUnknown() + func (m *GeoIPList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *GeoIPList) XXX_Merge(src proto.Message) + func (m *GeoIPList) XXX_Size() int + func (m *GeoIPList) XXX_Unmarshal(b []byte) error + type GeoIPMatcher struct + func (m *GeoIPMatcher) Init(cidrs []*CIDR) error + func (m *GeoIPMatcher) Match(ip net.IP) bool + type GeoIPMatcherContainer struct + func (c *GeoIPMatcherContainer) Add(geoip *GeoIP) (*GeoIPMatcher, error) + type GeoSite struct + CountryCode string + Domain []*Domain + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*GeoSite) Descriptor() ([]byte, []int) + func (*GeoSite) ProtoMessage() + func (m *GeoSite) GetCountryCode() string + func (m *GeoSite) GetDomain() []*Domain + func (m *GeoSite) Reset() + func (m *GeoSite) String() string + func (m *GeoSite) XXX_DiscardUnknown() + func (m *GeoSite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *GeoSite) XXX_Merge(src proto.Message) + func (m *GeoSite) XXX_Size() int + func (m *GeoSite) XXX_Unmarshal(b []byte) error + type GeoSiteList struct + Entry []*GeoSite + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*GeoSiteList) Descriptor() ([]byte, []int) + func (*GeoSiteList) ProtoMessage() + func (m *GeoSiteList) GetEntry() []*GeoSite + func (m *GeoSiteList) Reset() + func (m *GeoSiteList) String() string + func (m *GeoSiteList) XXX_DiscardUnknown() + func (m *GeoSiteList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *GeoSiteList) XXX_Merge(src proto.Message) + func (m *GeoSiteList) XXX_Size() int + func (m *GeoSiteList) XXX_Unmarshal(b []byte) error + type InboundTagMatcher struct + func NewInboundTagMatcher(tags []string) *InboundTagMatcher + func (v *InboundTagMatcher) Apply(ctx *Context) bool + type MultiGeoIPMatcher struct + func NewMultiGeoIPMatcher(geoips []*GeoIP, onSource bool) (*MultiGeoIPMatcher, error) + func (m *MultiGeoIPMatcher) Apply(ctx *Context) bool + type NetworkMatcher struct + func NewNetworkMatcher(network []net.Network) NetworkMatcher + func (v NetworkMatcher) Apply(ctx *Context) bool + type PortMatcher struct + func NewPortMatcher(list *net.PortList) *PortMatcher + func (v *PortMatcher) Apply(ctx *Context) bool + type ProtocolMatcher struct + func NewProtocolMatcher(protocols []string) *ProtocolMatcher + func (m *ProtocolMatcher) Apply(ctx *Context) bool + type RandomStrategy struct + func (s *RandomStrategy) PickOutbound(tags []string) string + type Router struct + func (*Router) Close() error + func (*Router) Start() error + func (*Router) Type() interface{} + func (r *Router) Init(config *Config, d dns.Client, ohm outbound.Manager) error + func (r *Router) PickRoute(ctx context.Context) (string, error) + type RoutingRule struct + Attributes string + Cidr []*CIDR + Domain []*Domain + Geoip []*GeoIP + InboundTag []string + NetworkList *net.NetworkList + Networks []net.Network + PortList *net.PortList + PortRange *net.PortRange + Protocol []string + SourceCidr []*CIDR + SourceGeoip []*GeoIP + TargetTag isRoutingRule_TargetTag + UserEmail []string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*RoutingRule) Descriptor() ([]byte, []int) + func (*RoutingRule) ProtoMessage() + func (*RoutingRule) XXX_OneofWrappers() []interface{} + func (m *RoutingRule) GetAttributes() string + func (m *RoutingRule) GetBalancingTag() string + func (m *RoutingRule) GetCidr() []*CIDR + func (m *RoutingRule) GetDomain() []*Domain + func (m *RoutingRule) GetGeoip() []*GeoIP + func (m *RoutingRule) GetInboundTag() []string + func (m *RoutingRule) GetNetworkList() *net.NetworkList + func (m *RoutingRule) GetNetworks() []net.Network + func (m *RoutingRule) GetPortList() *net.PortList + func (m *RoutingRule) GetPortRange() *net.PortRange + func (m *RoutingRule) GetProtocol() []string + func (m *RoutingRule) GetSourceCidr() []*CIDR + func (m *RoutingRule) GetSourceGeoip() []*GeoIP + func (m *RoutingRule) GetTag() string + func (m *RoutingRule) GetTargetTag() isRoutingRule_TargetTag + func (m *RoutingRule) GetUserEmail() []string + func (m *RoutingRule) Reset() + func (m *RoutingRule) String() string + func (m *RoutingRule) XXX_DiscardUnknown() + func (m *RoutingRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *RoutingRule) XXX_Merge(src proto.Message) + func (m *RoutingRule) XXX_Size() int + func (m *RoutingRule) XXX_Unmarshal(b []byte) error + func (rr *RoutingRule) BuildCondition() (Condition, error) + 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 *Context) bool + func (r *Rule) GetTag() (string, error) + type UserMatcher struct + func NewUserMatcher(users []string) *UserMatcher + func (v *UserMatcher) Apply(ctx *Context) bool Other modules containing this package github.com/unifyproxy/v2ray-core