Documentation ¶
Overview ¶
Package outbound implements multiple dns client and dispatcher for outbound connection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ResponseMessage *dns.Msg QuestionMessage *dns.Msg DNSUpstream *common.DNSUpstream EDNSClientSubnetIP string InboundIP string Hosts *hosts.Hosts Cache *cache.Cache }
func (*Client) CacheResult ¶
func (c *Client) CacheResult()
func (*Client) ExchangeFromCache ¶
func (*Client) ExchangeFromHosts ¶
func (*Client) ExchangeFromIP ¶
func (*Client) ExchangeFromLocal ¶
func (*Client) ExchangeFromRemote ¶
type ClientBundle ¶
type ClientBundle struct { ResponseMessage *dns.Msg QuestionMessage *dns.Msg ClientList []*Client DNSUpstreamList []*common.DNSUpstream InboundIP string MinimumTTL int Hosts *hosts.Hosts Cache *cache.Cache }
func NewClientBundle ¶
func (*ClientBundle) CacheResult ¶
func (cb *ClientBundle) CacheResult()
func (*ClientBundle) ExchangeFromLocal ¶
func (cb *ClientBundle) ExchangeFromLocal() bool
func (*ClientBundle) ExchangeFromRemote ¶
func (cb *ClientBundle) ExchangeFromRemote(isCache bool, isLog bool)
type Dispatcher ¶
type Dispatcher struct { QuestionMessage *dns.Msg PrimaryDNS []*common.DNSUpstream AlternativeDNS []*common.DNSUpstream OnlyPrimaryDNS bool PrimaryClientBundle *ClientBundle AlternativeClientBundle *ClientBundle ActiveClientBundle *ClientBundle IPNetworkPrimaryList []*net.IPNet IPNetworkAlternativeList []*net.IPNet DomainPrimaryList []string DomainAlternativeList []string RedirectIPv6Record bool InboundIP string MinimumTTL int Hosts *hosts.Hosts Cache *cache.Cache }
func (*Dispatcher) ChooseActiveClientBundle ¶
func (d *Dispatcher) ChooseActiveClientBundle()
func (*Dispatcher) Exchange ¶
func (d *Dispatcher) Exchange()
func (*Dispatcher) ExchangeForAlternativeDomain ¶
func (d *Dispatcher) ExchangeForAlternativeDomain() bool
func (*Dispatcher) ExchangeForIPv6 ¶
func (d *Dispatcher) ExchangeForIPv6() bool
func (*Dispatcher) ExchangeForPrimaryDomain ¶
func (d *Dispatcher) ExchangeForPrimaryDomain() bool
Click to show internal directories.
Click to hide internal directories.