Documentation
¶
Overview ¶
Package mobile contains a simple mobile API for github.com/AdguardTeam/dnsproxy
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestUpstream ¶ added in v0.9.7
TestUpstream checks if upstream is valid and available If it is, no error is returned. Otherwise this method returns an error with an explanation. * address - see upstream.AddressToUpstream for examples * bootstrap - an optional bootstrap DNS * timeout - timeout in milliseconds
Types ¶
type Config ¶
type Config struct {
Verbose bool // true if verbose output is enabled
LogOutput string // Path to the log file
ListenAddr string // IP address to listen to
ListenPort int // Port to listen to
BootstrapDNS string // Bootstrap DNS (i.e. 8.8.8.8:53)
Fallback string // Fallback resolver that will be used if the main one is not available (i.e. 1.1.1.1:53)
Upstreams string // A list of upstream resolvers (each on a new line)
Timeout int // Default timeout for all resolvers (milliseconds)
}
Config is the DNS proxy configuration which uses only the subset of types that is supported by gomobile
type DNSProxy ¶
type DNSProxy struct {
Config *Config // Proxy configuration
sync.RWMutex
// contains filtered or unexported fields
}
DNSProxy represents a proxy with it's configuration
type DNSStamp ¶ added in v0.9.7
type DNSStamp struct {
Proto int // Protocol (0x00 for plain, 0x01 for DNSCrypt, 0x02 for DOH, 0x03 for DOT
ServerAddr string // Server address
ProviderName string // Provider name
Path string // Path (for DOH)
}
DNSStamp is mobile-friendly DNS stamp structure
func ParseDNSStamp ¶ added in v0.9.7
ParseDNSStamp parses a DNS stamp string and returns a stamp instance or an error
Click to show internal directories.
Click to hide internal directories.