Documentation ¶
Index ¶
- Constants
- func InitGlobals(ipc ipcache, domainc domaincache, dm DomainMatcher, ...)
- func MsgExchangeOverGoogleDOH(req *dns.Msg, rt http.RoundTripper) (resp *dns.Msg, err error)
- func MsgExtractAnswer(msg *dns.Msg) (dns.RR, net.IP)
- func MsgNewReplyFromReq(req *dns.Msg, answer ...dns.RR) *dns.Msg
- func MsgSetECSWithAddr(m *dns.Msg, addr net.IP)
- func NewDnsTransport(nameserver, net string, _proxy proxy.Dialer) *dnsTransport
- func NewDomaincache(defaultExpiration, cleanupInterval time.Duration) domaincache
- func NewIpcache(defaultExpiration, cleanupInterval time.Duration) ipcache
- func RRNewFromGoogleDohRR(grr google.DNSRR) dns.RR
- func ServeDNS(laddr string) error
- func ServeProxy(laddr string, proxy, direct *gost.ProxyChain) error
- type DomainMatcher
Constants ¶
View Source
const ( AddrIPv4 uint8 = gosocks5.AddrIPv4 AddrDomain = gosocks5.AddrDomain AddrIPv6 = gosocks5.AddrIPv6 )
Variables ¶
This section is empty.
Functions ¶
func InitGlobals ¶
func InitGlobals(ipc ipcache, domainc domaincache, dm DomainMatcher, ipMatchCHN func(net.IP) bool, subnetLocalIP, subnetProxyIP net.IP, dtObedient, dtAbroad *dnsTransport)
init global vars
func MsgExchangeOverGoogleDOH ¶
Perform query into Google DNS over HTTPS server
func MsgExtractAnswer ¶
extract answer from dns msg FIXME: deal with name alias
func MsgNewReplyFromReq ¶
--- impl dns.Msg
func NewDnsTransport ¶
func NewDomaincache ¶
--- impl domaincache
func NewIpcache ¶
--- impl ipcache
func RRNewFromGoogleDohRR ¶
Initialize a new RRGeneric from a google dns over https RR
func ServeProxy ¶
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.