proxy

package
v0.0.0-...-6a5a8bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CloudFlareDoH = "https://cloudflare-dns.com/dns-query"
	GoogleDoH     = "https://dns.google/dns-query"
)

Variables

This section is empty.

Functions

func Resolver

func Resolver(ctx context.Context, port int, network string, remoteDNS string) *net.Resolver

Resolver starts DNS server and returns resolver using it.

If port is set to 0, the first free port will be used

Types

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

func (*Proxy) Serve

func (p *Proxy) Serve(port int, network, remoteDNS string) error

Serve starts server and redirects all inputs to the target DNS This function blocks until server is stopped

Directories

Path Synopsis
Package automount has the only purpose: to automatically start DNS-DoH proxy and replace default Go resolver with resolver returned by dns_proxy.Resolver.
Package automount has the only purpose: to automatically start DNS-DoH proxy and replace default Go resolver with resolver returned by dns_proxy.Resolver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL