Documentation
¶
Index ¶
- type TunDns
- func (tunDns *TunDns) Exchange(m *dns.Msg) (r *dns.Msg, rtt time.Duration, err error)
- func (tunDns *TunDns) LocalResolve(domain string, ipType int) (net.IP, uint32, error)
- func (tunDns *TunDns) ModifyDNSResponse(packet []byte) ([]byte, error)
- func (tunDns *TunDns) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
- func (tunDns *TunDns) Shutdown()
- func (tunDns *TunDns) StartSmartDns()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TunDns ¶
type TunDns struct { ExcludeDomains sync.Map DnsAddr string DnsPort uint16 Ip2Domain *bimap.BiMap[string, string] SendMinPort int SendMaxPort int ExcludePorts sync.Map // contains filtered or unexported fields }
func (*TunDns) LocalResolve ¶
本地dns解析有缓存 domain 域名有最后一个"."
func (*TunDns) ModifyDNSResponse ¶
func (*TunDns) StartSmartDns ¶
func (tunDns *TunDns) StartSmartDns()
Click to show internal directories.
Click to hide internal directories.