Documentation ¶
Index ¶
- func AddCachedDnsItem(ip, domain string, rule constants.DnsRule)
- func IsContainsDomain(domain string, s string) bool
- func IsDomainMatchRule(pattern string, domain string) bool
- func IsDomainsContain(items []string, value string) bool
- func IsSubnetContainsIp(s string, i string) bool
- type Cache
- type CacheItem
- type Config
- func (c Config) GetDns(domain string, isLocal bool) (resolver.Client, constants.DnsRule)
- func (c Config) GetDnsRule(ip string) constants.IpRule
- func (c Config) GetDnsServerRule(ip string) constants.IpRule
- func (c Config) GetGeoRule(ip string) constants.IpRule
- func (c Config) GetRule(ip string) constants.IpRule
- func (c Config) GetSubnetRule(ip string) constants.IpRule
- func (c Config) GetTrueProxyServerRule(ip string) constants.IpRule
- type DnsDistribution
- type IpDistribution
- type IpMatcher
- type MatcherList
- type SubDnsDistribution
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCachedDnsItem ¶ added in v0.2.6
func IsContainsDomain ¶
func IsDomainMatchRule ¶
func IsDomainsContain ¶
func IsSubnetContainsIp ¶
Types ¶
type CacheItem ¶ added in v0.2.6
func GetCachedDnsItem ¶ added in v0.2.6
type Config ¶
type Config struct { Dns DnsDistribution Ip IpDistribution TrueProxyServer string // contains filtered or unexported fields }
func (Config) GetDnsServerRule ¶ added in v0.3.1
func (Config) GetSubnetRule ¶ added in v0.3.1
type DnsDistribution ¶
type DnsDistribution struct { Local SubDnsDistribution Remote SubDnsDistribution BoostNameserver string }
func NewDnsDistribution ¶
func NewDnsDistribution( bootDns string, remoteDns string, localDns string, config configuration.DnsItem, ) (DnsDistribution, error)
type IpDistribution ¶
type IpDistribution struct { Subnet IpMatcher GeoIps IpMatcher GeoSites IpMatcher DefaultProxy bool }
func NewIpDistribution ¶
func NewIpDistribution( config configuration.IpItem, ) (IpDistribution, error)
type MatcherList ¶
type SubDnsDistribution ¶
type SubDnsDistribution struct { Domains MatcherList GeoSites MatcherList Address string Client resolver.Client }
Click to show internal directories.
Click to hide internal directories.