Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultControl = "/var/run/nextdns.sock"
Variables ¶
This section is empty.
Functions ¶
func ParseBytes ¶ added in v1.5.0
ParseBytes returns the number of bytes express using human notation like 1MB or 1.5GB.
Types ¶
type Config ¶ added in v1.2.3
type Config struct { File string Listens []string Control string ConfigDeprecated Profiles Profile Profiles Forwarders Forwarders LogQueries bool CacheSize string CacheMaxAge time.Duration MaxTTL time.Duration ReportClientInfo bool DiscoveryDNS string MDNS string DetectCaptivePortals bool BogusPriv bool UseHosts bool Timeout time.Duration MaxInflightRequests uint SetupRouter bool AutoActivate bool Debug bool }
type Forwarders ¶ added in v1.2.3
type Forwarders []Resolver
Forwarders is a list of Resolver with rules.
func (*Forwarders) Get ¶ added in v1.2.3
func (f *Forwarders) Get(domain string) resolver.Resolver
Get returns the server matching the domain conditions.
func (*Forwarders) Resolve ¶ added in v1.2.3
func (f *Forwarders) Resolve(ctx context.Context, q query.Query, buf []byte) (int, resolver.ResolveInfo, error)
Resolve implements proxy.Resolver interface.
func (*Forwarders) Set ¶ added in v1.2.3
func (f *Forwarders) Set(value string) error
Set is the method to set the flag value, part of the flag.Value interface.
func (*Forwarders) String ¶ added in v1.2.3
func (f *Forwarders) String() string
String is the method to format the flag's value
func (*Forwarders) Strings ¶ added in v1.4.0
func (f *Forwarders) Strings() []string
type Profiles ¶ added in v1.39.0
type Profiles []profile
Profiles is a list of profile with rules.
func (*Profiles) Get ¶ added in v1.39.0
Get returns the configuration matching the ip and mac conditions.
func (*Profiles) Set ¶ added in v1.39.0
Set is the method to set the flag value, part of the flag.Value interface.
Click to show internal directories.
Click to hide internal directories.