Documentation ¶
Index ¶
- Constants
- Variables
- func CustomDialContext(ctx context.Context, network, addr string) (net.Conn, error)
- func CustomTLS(ca *tls.Certificate) func(host string, ctx *goproxy.ProxyCtx) (*tls.Config, error)
- func GetClient() *http.Client
- func GetDirectClient() *http.Client
- func IPs(resp *dns.Response) []string
- func Reload()
- func TTL(resp *dns.Response) int
- type CustomProxy
- type DoH
- type Provider
Constants ¶
View Source
const ( CloudflareProvider provider = iota DNSPodProvider GoogleProvider Quad9Provider )
DoH Providers enum
Variables ¶
View Source
var ( ResponseTypeA = 1 ResponseTypeAAAA = 28 )
Supported dns response types
View Source
var ( // Proxy ... Proxy = goproxy.NewProxyHttpServer() // ProxyPort ... ProxyPort = 65222 )
View Source
var AlwaysHTTPMitm goproxy.FuncHttpsHandler = func(host string, ctx *goproxy.ProxyCtx) (*goproxy.ConnectAction, string) { return &goproxy.ConnectAction{Action: goproxy.ConnectMitm, TLSConfig: CustomTLS(&goproxy.GoproxyCa)}, host }
AlwaysHTTPMitm ...
View Source
var ( Providers = []provider{ CloudflareProvider, DNSPodProvider, GoogleProvider, Quad9Provider, } )
DoH Providers list
Functions ¶
func CustomDialContext ¶
CustomDialContext ...
Types ¶
type CustomProxy ¶
CustomProxy stores http.Server with field showing there was an error while listening.
type DoH ¶ added in v0.1.103
DoH is doh client
func UseProviders ¶ added in v0.1.103
func UseProviders(provider ...provider) *DoH
Click to show internal directories.
Click to hide internal directories.