Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeSharedKey(cryptoConstruction CryptoConstruction, secretKey *[32]byte, serverPk *[32]byte, ...) (sharedKey [32]byte)
- func ConfigLoad(proxy *Proxy) error
- func EmptyResponseFromMessage(srcMsg *dns.Msg) *dns.Msg
- func ExtractHostAndPort(str string, defaultPort int) (host string, port int)
- func HasTCFlag(packet []byte) bool
- func Max(a, b int) int
- func MaxF(a, b float64) float64
- func Min(a, b int) int
- func MinF(a, b float64) float64
- func NetProbe(address string, timeout int) error
- func NormalizeQName(str string) (string, error)
- func NormalizeRawQName(name *[]byte)
- func ParseAllWeeklyRanges(allWeeklyRangesStr map[string]WeeklyRangesStr) (*map[string]WeeklyRanges, error)
- func ParseIP(ipStr string) net.IP
- func PrefetchSources(xTransport *XTransport, sources []*Source) time.Duration
- func PrefixWithSize(packet []byte) ([]byte, error)
- func Rcode(packet []byte) uint8
- func ReadPrefixed(conn *net.Conn) ([]byte, error)
- func ReadTextFile(filename string) (string, error)
- func RefusedResponseFromMessage(srcMsg *dns.Msg, refusedCode bool, ipv4 net.IP, ipv6 net.IP, ttl uint32) *dns.Msg
- func Resolve(name string)
- func ServiceManagerReadyNotify() error
- func ServiceManagerStartNotify() error
- func SetTransactionID(packet []byte, tid uint16)
- func StringQuote(str string) string
- func StringReverse(s string) string
- func StringStripSpaces(str string) string
- func StringTwoFields(str string) (string, string, bool)
- func TransactionID(packet []byte) uint16
- func TrimAndStripInlineComments(str string) string
- func TruncatedResponse(packet []byte) ([]byte, error)
- type AnonymizedDNSConfig
- type AnonymizedDNSRouteConfig
- type BlockIPConfig
- type BlockNameConfig
- type BlockedNames
- type BrokenImplementationsConfig
- type CachedIPItem
- type CachedIPs
- type CachedResponse
- type CachedResponses
- type CertInfo
- type CloakedName
- type Config
- type ConfigFlags
- type CryptoConstruction
- type DOHClientCreds
- type LBStrategy
- type LBStrategyFirst
- type LBStrategyP2
- type LBStrategyPH
- type LBStrategyPN
- type LBStrategyRandom
- type LocalDoHConfig
- type NxLogConfig
- type PatternMatcher
- type PatternType
- type Plugin
- type PluginBlockIP
- func (plugin *PluginBlockIP) Description() string
- func (plugin *PluginBlockIP) Drop() error
- func (plugin *PluginBlockIP) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginBlockIP) Init(proxy *Proxy) error
- func (plugin *PluginBlockIP) Name() string
- func (plugin *PluginBlockIP) Reload() error
- type PluginBlockIPv6
- func (plugin *PluginBlockIPv6) Description() string
- func (plugin *PluginBlockIPv6) Drop() error
- func (plugin *PluginBlockIPv6) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginBlockIPv6) Init(proxy *Proxy) error
- func (plugin *PluginBlockIPv6) Name() string
- func (plugin *PluginBlockIPv6) Reload() error
- type PluginBlockName
- func (plugin *PluginBlockName) Description() string
- func (plugin *PluginBlockName) Drop() error
- func (plugin *PluginBlockName) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginBlockName) Init(proxy *Proxy) error
- func (plugin *PluginBlockName) Name() string
- func (plugin *PluginBlockName) Reload() error
- type PluginBlockNameResponse
- func (plugin *PluginBlockNameResponse) Description() string
- func (plugin *PluginBlockNameResponse) Drop() error
- func (plugin *PluginBlockNameResponse) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginBlockNameResponse) Init(proxy *Proxy) error
- func (plugin *PluginBlockNameResponse) Name() string
- func (plugin *PluginBlockNameResponse) Reload() error
- type PluginBlockUndelegated
- func (plugin *PluginBlockUndelegated) Description() string
- func (plugin *PluginBlockUndelegated) Drop() error
- func (plugin *PluginBlockUndelegated) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginBlockUndelegated) Init(proxy *Proxy) error
- func (plugin *PluginBlockUndelegated) Name() string
- func (plugin *PluginBlockUndelegated) Reload() error
- type PluginBlockUnqualified
- func (plugin *PluginBlockUnqualified) Description() string
- func (plugin *PluginBlockUnqualified) Drop() error
- func (plugin *PluginBlockUnqualified) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginBlockUnqualified) Init(proxy *Proxy) error
- func (plugin *PluginBlockUnqualified) Name() string
- func (plugin *PluginBlockUnqualified) Reload() error
- type PluginCache
- func (plugin *PluginCache) Description() string
- func (plugin *PluginCache) Drop() error
- func (plugin *PluginCache) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginCache) Init(proxy *Proxy) error
- func (plugin *PluginCache) Name() string
- func (plugin *PluginCache) Reload() error
- type PluginCacheResponse
- func (plugin *PluginCacheResponse) Description() string
- func (plugin *PluginCacheResponse) Drop() error
- func (plugin *PluginCacheResponse) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginCacheResponse) Init(proxy *Proxy) error
- func (plugin *PluginCacheResponse) Name() string
- func (plugin *PluginCacheResponse) Reload() error
- type PluginCloak
- func (plugin *PluginCloak) Description() string
- func (plugin *PluginCloak) Drop() error
- func (plugin *PluginCloak) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginCloak) Init(proxy *Proxy) error
- func (plugin *PluginCloak) Name() string
- func (plugin *PluginCloak) Reload() error
- type PluginFirefox
- func (plugin *PluginFirefox) Description() string
- func (plugin *PluginFirefox) Drop() error
- func (plugin *PluginFirefox) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginFirefox) Init(proxy *Proxy) error
- func (plugin *PluginFirefox) Name() string
- func (plugin *PluginFirefox) Reload() error
- type PluginForward
- func (plugin *PluginForward) Description() string
- func (plugin *PluginForward) Drop() error
- func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginForward) Init(proxy *Proxy) error
- func (plugin *PluginForward) Name() string
- func (plugin *PluginForward) Reload() error
- type PluginForwardEntry
- type PluginGetSetPayloadSize
- func (plugin *PluginGetSetPayloadSize) Description() string
- func (plugin *PluginGetSetPayloadSize) Drop() error
- func (plugin *PluginGetSetPayloadSize) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginGetSetPayloadSize) Init(proxy *Proxy) error
- func (plugin *PluginGetSetPayloadSize) Name() string
- func (plugin *PluginGetSetPayloadSize) Reload() error
- type PluginNxLog
- func (plugin *PluginNxLog) Description() string
- func (plugin *PluginNxLog) Drop() error
- func (plugin *PluginNxLog) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginNxLog) Init(proxy *Proxy) error
- func (plugin *PluginNxLog) Name() string
- func (plugin *PluginNxLog) Reload() error
- type PluginQueryLog
- func (plugin *PluginQueryLog) Description() string
- func (plugin *PluginQueryLog) Drop() error
- func (plugin *PluginQueryLog) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginQueryLog) Init(proxy *Proxy) error
- func (plugin *PluginQueryLog) Name() string
- func (plugin *PluginQueryLog) Reload() error
- type PluginQueryMeta
- func (plugin *PluginQueryMeta) Description() string
- func (plugin *PluginQueryMeta) Drop() error
- func (plugin *PluginQueryMeta) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginQueryMeta) Init(proxy *Proxy) error
- func (plugin *PluginQueryMeta) Name() string
- func (plugin *PluginQueryMeta) Reload() error
- type PluginWhitelistName
- func (plugin *PluginWhitelistName) Description() string
- func (plugin *PluginWhitelistName) Drop() error
- func (plugin *PluginWhitelistName) Eval(pluginsState *PluginsState, msg *dns.Msg) error
- func (plugin *PluginWhitelistName) Init(proxy *Proxy) error
- func (plugin *PluginWhitelistName) Name() string
- func (plugin *PluginWhitelistName) Reload() error
- type PluginsAction
- type PluginsGlobals
- type PluginsReturnCode
- type PluginsState
- func (pluginsState *PluginsState) ApplyLoggingPlugins(pluginsGlobals *PluginsGlobals) error
- func (pluginsState *PluginsState) ApplyQueryPlugins(pluginsGlobals *PluginsGlobals, packet []byte, needsEDNS0Padding bool) ([]byte, error)
- func (pluginsState *PluginsState) ApplyResponsePlugins(pluginsGlobals *PluginsGlobals, packet []byte, ttl *uint32) ([]byte, error)
- type Proxy
- func (proxy *Proxy) Decrypt(serverInfo *ServerInfo, sharedKey *[32]byte, encrypted []byte, nonce []byte) ([]byte, error)
- func (proxy *Proxy) Encrypt(serverInfo *ServerInfo, packet []byte, proto string) (sharedKey *[32]byte, encrypted []byte, clientNonce []byte, err error)
- func (proxy *Proxy) InitPluginsGlobals() error
- func (proxy *Proxy) StartProxy()
- func (proxy *Proxy) SystemDListeners() error
- type QueryLogConfig
- type QuestionSizeEstimator
- type RegisteredServer
- type ServerBugs
- type ServerInfo
- type ServerSummary
- type ServersInfo
- type Source
- type SourceConfig
- type SourceFormat
- type StaticConfig
- type TLSClientAuthConfig
- type TLSClientAuthCredsConfig
- type TimeRange
- type TimeRangeStr
- type WeeklyRanges
- type WeeklyRangesStr
- type WhitelistNameConfig
- type XTransport
- func (xTransport *XTransport) DoHQuery(useGet bool, url *url.URL, body []byte, timeout time.Duration) ([]byte, *tls.ConnectionState, time.Duration, error)
- func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string, contentType string, body *[]byte, ...) ([]byte, *tls.ConnectionState, time.Duration, error)
- func (xTransport *XTransport) Get(url *url.URL, accept string, timeout time.Duration) ([]byte, *tls.ConnectionState, time.Duration, error)
- func (xTransport *XTransport) Post(url *url.URL, accept string, contentType string, body *[]byte, ...) ([]byte, *tls.ConnectionState, time.Duration, error)
Constants ¶
View Source
const ( MaxTimeout = 3600 DefaultNetprobeAddress = "9.9.9.9:53" )
View Source
const ( NonceSize = xsecretbox.NonceSize HalfNonceSize = xsecretbox.NonceSize / 2 TagSize = xsecretbox.TagSize PublicKeySize = 32 QueryOverhead = ClientMagicLen + PublicKeySize + HalfNonceSize + TagSize ResponseOverhead = len(ServerMagic) + NonceSize + TagSize )
View Source
const ( PluginsActionNone = 0 PluginsActionContinue = 1 PluginsActionDrop = 2 PluginsActionReject = 3 PluginsActionSynth = 4 )
View Source
const ( PluginsReturnCodePass = iota PluginsReturnCodeForward PluginsReturnCodeDrop PluginsReturnCodeReject PluginsReturnCodeSynth PluginsReturnCodeParseError PluginsReturnCodeNXDomain PluginsReturnCodeResponseError PluginsReturnCodeServFail PluginsReturnCodeNetworkError PluginsReturnCodeCloak PluginsReturnCodeServerTimeout )
View Source
const ( DefaultPrefetchDelay time.Duration = 24 * time.Hour MinimumPrefetchInterval time.Duration = 10 * time.Minute )
View Source
const ( DefaultFallbackResolver = "9.9.9.9:53" DefaultKeepAlive = 5 * time.Second DefaultTimeout = 30 * time.Second SystemResolverIPTTL = 24 * time.Hour MinResolverIPTTL = 12 * time.Hour ExpiredCachedIPGraceTTL = 15 * time.Minute )
View Source
const (
ClientMagicLen = 8
)
View Source
const (
MaxHTTPBodyLength = 4000000
)
View Source
const (
RTTEwmaDecay = 10.0
)
View Source
const (
SizeEstimatorEwmaDecay = 100.0
)
View Source
const (
SourceFormatV2 = iota
)
Variables ¶
View Source
var ( CertMagic = [4]byte{0x44, 0x4e, 0x53, 0x43} ServerMagic = [8]byte{0x72, 0x36, 0x66, 0x6e, 0x76, 0x57, 0x6a, 0x38} MinDNSPacketSize = 12 + 5 MaxDNSPacketSize = 4096 MaxDNSUDPPacketSize = 4096 MaxDNSUDPSafePacketSize = 1252 InitialMinQuestionSize = 512 )
View Source
var ( FileDescriptors = make([]*os.File, 0) FileDescriptorNum = 0 )
View Source
var DefaultLBStrategy = LBStrategyP2{}
View Source
var PluginsReturnCodeToString = map[PluginsReturnCode]string{ PluginsReturnCodePass: "PASS", PluginsReturnCodeForward: "FORWARD", PluginsReturnCodeDrop: "DROP", PluginsReturnCodeReject: "REJECT", PluginsReturnCodeSynth: "SYNTH", PluginsReturnCodeParseError: "PARSE_ERROR", PluginsReturnCodeNXDomain: "NXDOMAIN", PluginsReturnCodeResponseError: "RESPONSE_ERROR", PluginsReturnCodeServFail: "SERVFAIL", PluginsReturnCodeNetworkError: "NETWORK_ERROR", PluginsReturnCodeCloak: "CLOAK", PluginsReturnCodeServerTimeout: "SERVER_TIMEOUT", }
Functions ¶
func ComputeSharedKey ¶
func ComputeSharedKey(cryptoConstruction CryptoConstruction, secretKey *[32]byte, serverPk *[32]byte, providerName *string) (sharedKey [32]byte)
func ConfigLoad ¶
func ExtractHostAndPort ¶
func NormalizeQName ¶
func NormalizeRawQName ¶
func NormalizeRawQName(name *[]byte)
func ParseAllWeeklyRanges ¶
func ParseAllWeeklyRanges(allWeeklyRangesStr map[string]WeeklyRangesStr) (*map[string]WeeklyRanges, error)
func PrefetchSources ¶
func PrefetchSources(xTransport *XTransport, sources []*Source) time.Duration
PrefetchSources downloads latest versions of given sources, ensuring they have a valid signature before caching
func PrefixWithSize ¶
func ReadTextFile ¶
func ServiceManagerReadyNotify ¶
func ServiceManagerReadyNotify() error
func ServiceManagerStartNotify ¶
func ServiceManagerStartNotify() error
func SetTransactionID ¶
func StringQuote ¶
func StringReverse ¶
func StringStripSpaces ¶
func TransactionID ¶
func TruncatedResponse ¶
Types ¶
type AnonymizedDNSConfig ¶
type AnonymizedDNSConfig struct { Routes []AnonymizedDNSRouteConfig `toml:"routes"` SkipIncompatible bool `toml:"skip_incompatible"` }
type BlockIPConfig ¶
type BlockNameConfig ¶
type BlockedNames ¶
type BlockedNames struct {
// contains filtered or unexported fields
}
type CachedIPItem ¶
type CachedIPItem struct {
// contains filtered or unexported fields
}
type CachedResponse ¶
type CachedResponse struct {
// contains filtered or unexported fields
}
type CachedResponses ¶
type CertInfo ¶
type CertInfo struct { ServerPk [32]byte MagicQuery [ClientMagicLen]byte CryptoConstruction CryptoConstruction ForwardSecurity bool }
type CloakedName ¶
type CloakedName struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { LogLevel int `toml:"log_level"` LogFile *string `toml:"log_file"` UseSyslog bool `toml:"use_syslog"` ServerNames []string `toml:"server_names"` DisabledServerNames []string `toml:"disabled_server_names"` ListenAddresses []string `toml:"listen_addresses"` LocalDoH LocalDoHConfig `toml:"local_doh"` Daemonize bool UserName string `toml:"user_name"` ForceTCP bool `toml:"force_tcp"` Timeout int `toml:"timeout"` KeepAlive int `toml:"keepalive"` Proxy string `toml:"proxy"` CertRefreshDelay int `toml:"cert_refresh_delay"` CertIgnoreTimestamp bool `toml:"cert_ignore_timestamp"` EphemeralKeys bool `toml:"dnscrypt_ephemeral_keys"` LBStrategy string `toml:"lb_strategy"` LBEstimator bool `toml:"lb_estimator"` BlockIPv6 bool `toml:"block_ipv6"` BlockUnqualified bool `toml:"block_unqualified"` BlockUndelegated bool `toml:"block_undelegated"` Cache bool CacheSize int `toml:"cache_size"` CacheNegTTL uint32 `toml:"cache_neg_ttl"` CacheNegMinTTL uint32 `toml:"cache_neg_min_ttl"` CacheNegMaxTTL uint32 `toml:"cache_neg_max_ttl"` CacheMinTTL uint32 `toml:"cache_min_ttl"` CacheMaxTTL uint32 `toml:"cache_max_ttl"` RejectTTL uint32 `toml:"reject_ttl"` CloakTTL uint32 `toml:"cloak_ttl"` QueryLog QueryLogConfig `toml:"query_log"` NxLog NxLogConfig `toml:"nx_log"` BlockName BlockNameConfig `toml:"blacklist"` WhitelistName WhitelistNameConfig `toml:"whitelist"` BlockIP BlockIPConfig `toml:"ip_blacklist"` ForwardFile string `toml:"forwarding_rules"` CloakFile string `toml:"cloaking_rules"` StaticsConfig map[string]StaticConfig `toml:"static"` SourcesConfig map[string]SourceConfig `toml:"sources"` BrokenImplementations BrokenImplementationsConfig `toml:"broken_implementations"` SourceRequireDNSSEC bool `toml:"require_dnssec"` SourceRequireNoLog bool `toml:"require_nolog"` SourceRequireNoFilter bool `toml:"require_nofilter"` SourceDNSCrypt bool `toml:"dnscrypt_servers"` SourceDoH bool `toml:"doh_servers"` SourceIPv4 bool `toml:"ipv4_servers"` SourceIPv6 bool `toml:"ipv6_servers"` MaxClients uint32 `toml:"max_clients"` FallbackResolver string `toml:"fallback_resolver"` FallbackResolvers []string `toml:"fallback_resolvers"` IgnoreSystemDNS bool `toml:"ignore_system_dns"` AllWeeklyRanges map[string]WeeklyRangesStr `toml:"schedules"` LogMaxSize int `toml:"log_files_max_size"` LogMaxAge int `toml:"log_files_max_age"` LogMaxBackups int `toml:"log_files_max_backups"` TLSDisableSessionTickets bool `toml:"tls_disable_session_tickets"` TLSCipherSuite []uint16 `toml:"tls_cipher_suite"` NetprobeAddress string `toml:"netprobe_address"` NetprobeTimeout int `toml:"netprobe_timeout"` OfflineMode bool `toml:"offline_mode"` HTTPProxyURL string `toml:"http_proxy"` RefusedCodeInResponses bool `toml:"refused_code_in_responses"` BlockedQueryResponse string `toml:"blocked_query_response"` QueryMeta []string `toml:"query_meta"` AnonymizedDNS AnonymizedDNSConfig `toml:"anonymized_dns"` TLSClientAuth TLSClientAuthConfig `toml:"tls_client_auth"` }
type ConfigFlags ¶
type CryptoConstruction ¶
type CryptoConstruction uint16
const ( UndefinedConstruction CryptoConstruction = iota XSalsa20Poly1305 XChacha20Poly1305 )
type DOHClientCreds ¶
type DOHClientCreds struct {
// contains filtered or unexported fields
}
type LBStrategy ¶
type LBStrategy interface {
// contains filtered or unexported methods
}
type LBStrategyFirst ¶
type LBStrategyFirst struct{}
type LBStrategyP2 ¶
type LBStrategyP2 struct{}
type LBStrategyPH ¶
type LBStrategyPH struct{}
type LBStrategyPN ¶
type LBStrategyPN struct {
// contains filtered or unexported fields
}
type LBStrategyRandom ¶
type LBStrategyRandom struct{}
type LocalDoHConfig ¶
type NxLogConfig ¶
type PatternMatcher ¶
type PatternMatcher struct {
// contains filtered or unexported fields
}
func NewPatternMatcher ¶
func NewPatternMatcher() *PatternMatcher
type PatternType ¶
type PatternType int
const ( PatternTypeNone PatternType = iota PatternTypePrefix PatternTypeSuffix PatternTypeSubstring PatternTypePattern PatternTypeExact )
type PluginBlockIP ¶
type PluginBlockIP struct {
// contains filtered or unexported fields
}
func (*PluginBlockIP) Description ¶
func (plugin *PluginBlockIP) Description() string
func (*PluginBlockIP) Drop ¶
func (plugin *PluginBlockIP) Drop() error
func (*PluginBlockIP) Eval ¶
func (plugin *PluginBlockIP) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginBlockIP) Init ¶
func (plugin *PluginBlockIP) Init(proxy *Proxy) error
func (*PluginBlockIP) Name ¶
func (plugin *PluginBlockIP) Name() string
func (*PluginBlockIP) Reload ¶
func (plugin *PluginBlockIP) Reload() error
type PluginBlockIPv6 ¶
type PluginBlockIPv6 struct{}
func (*PluginBlockIPv6) Description ¶
func (plugin *PluginBlockIPv6) Description() string
func (*PluginBlockIPv6) Drop ¶
func (plugin *PluginBlockIPv6) Drop() error
func (*PluginBlockIPv6) Eval ¶
func (plugin *PluginBlockIPv6) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginBlockIPv6) Init ¶
func (plugin *PluginBlockIPv6) Init(proxy *Proxy) error
func (*PluginBlockIPv6) Name ¶
func (plugin *PluginBlockIPv6) Name() string
func (*PluginBlockIPv6) Reload ¶
func (plugin *PluginBlockIPv6) Reload() error
type PluginBlockName ¶
type PluginBlockName struct { }
func (*PluginBlockName) Description ¶
func (plugin *PluginBlockName) Description() string
func (*PluginBlockName) Drop ¶
func (plugin *PluginBlockName) Drop() error
func (*PluginBlockName) Eval ¶
func (plugin *PluginBlockName) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginBlockName) Init ¶
func (plugin *PluginBlockName) Init(proxy *Proxy) error
func (*PluginBlockName) Name ¶
func (plugin *PluginBlockName) Name() string
func (*PluginBlockName) Reload ¶
func (plugin *PluginBlockName) Reload() error
type PluginBlockNameResponse ¶
type PluginBlockNameResponse struct { }
func (*PluginBlockNameResponse) Description ¶
func (plugin *PluginBlockNameResponse) Description() string
func (*PluginBlockNameResponse) Drop ¶
func (plugin *PluginBlockNameResponse) Drop() error
func (*PluginBlockNameResponse) Eval ¶
func (plugin *PluginBlockNameResponse) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginBlockNameResponse) Init ¶
func (plugin *PluginBlockNameResponse) Init(proxy *Proxy) error
func (*PluginBlockNameResponse) Name ¶
func (plugin *PluginBlockNameResponse) Name() string
func (*PluginBlockNameResponse) Reload ¶
func (plugin *PluginBlockNameResponse) Reload() error
type PluginBlockUndelegated ¶
type PluginBlockUndelegated struct {
// contains filtered or unexported fields
}
func (*PluginBlockUndelegated) Description ¶
func (plugin *PluginBlockUndelegated) Description() string
func (*PluginBlockUndelegated) Drop ¶
func (plugin *PluginBlockUndelegated) Drop() error
func (*PluginBlockUndelegated) Eval ¶
func (plugin *PluginBlockUndelegated) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginBlockUndelegated) Init ¶
func (plugin *PluginBlockUndelegated) Init(proxy *Proxy) error
func (*PluginBlockUndelegated) Name ¶
func (plugin *PluginBlockUndelegated) Name() string
func (*PluginBlockUndelegated) Reload ¶
func (plugin *PluginBlockUndelegated) Reload() error
type PluginBlockUnqualified ¶
type PluginBlockUnqualified struct { }
func (*PluginBlockUnqualified) Description ¶
func (plugin *PluginBlockUnqualified) Description() string
func (*PluginBlockUnqualified) Drop ¶
func (plugin *PluginBlockUnqualified) Drop() error
func (*PluginBlockUnqualified) Eval ¶
func (plugin *PluginBlockUnqualified) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginBlockUnqualified) Init ¶
func (plugin *PluginBlockUnqualified) Init(proxy *Proxy) error
func (*PluginBlockUnqualified) Name ¶
func (plugin *PluginBlockUnqualified) Name() string
func (*PluginBlockUnqualified) Reload ¶
func (plugin *PluginBlockUnqualified) Reload() error
type PluginCache ¶
type PluginCache struct { }
func (*PluginCache) Description ¶
func (plugin *PluginCache) Description() string
func (*PluginCache) Drop ¶
func (plugin *PluginCache) Drop() error
func (*PluginCache) Eval ¶
func (plugin *PluginCache) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginCache) Init ¶
func (plugin *PluginCache) Init(proxy *Proxy) error
func (*PluginCache) Name ¶
func (plugin *PluginCache) Name() string
func (*PluginCache) Reload ¶
func (plugin *PluginCache) Reload() error
type PluginCacheResponse ¶
type PluginCacheResponse struct { }
func (*PluginCacheResponse) Description ¶
func (plugin *PluginCacheResponse) Description() string
func (*PluginCacheResponse) Drop ¶
func (plugin *PluginCacheResponse) Drop() error
func (*PluginCacheResponse) Eval ¶
func (plugin *PluginCacheResponse) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginCacheResponse) Init ¶
func (plugin *PluginCacheResponse) Init(proxy *Proxy) error
func (*PluginCacheResponse) Name ¶
func (plugin *PluginCacheResponse) Name() string
func (*PluginCacheResponse) Reload ¶
func (plugin *PluginCacheResponse) Reload() error
type PluginCloak ¶
func (*PluginCloak) Description ¶
func (plugin *PluginCloak) Description() string
func (*PluginCloak) Drop ¶
func (plugin *PluginCloak) Drop() error
func (*PluginCloak) Eval ¶
func (plugin *PluginCloak) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginCloak) Init ¶
func (plugin *PluginCloak) Init(proxy *Proxy) error
func (*PluginCloak) Name ¶
func (plugin *PluginCloak) Name() string
func (*PluginCloak) Reload ¶
func (plugin *PluginCloak) Reload() error
type PluginFirefox ¶
type PluginFirefox struct { }
func (*PluginFirefox) Description ¶
func (plugin *PluginFirefox) Description() string
func (*PluginFirefox) Drop ¶
func (plugin *PluginFirefox) Drop() error
func (*PluginFirefox) Eval ¶
func (plugin *PluginFirefox) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginFirefox) Init ¶
func (plugin *PluginFirefox) Init(proxy *Proxy) error
func (*PluginFirefox) Name ¶
func (plugin *PluginFirefox) Name() string
func (*PluginFirefox) Reload ¶
func (plugin *PluginFirefox) Reload() error
type PluginForward ¶
type PluginForward struct {
// contains filtered or unexported fields
}
func (*PluginForward) Description ¶
func (plugin *PluginForward) Description() string
func (*PluginForward) Drop ¶
func (plugin *PluginForward) Drop() error
func (*PluginForward) Eval ¶
func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginForward) Init ¶
func (plugin *PluginForward) Init(proxy *Proxy) error
func (*PluginForward) Name ¶
func (plugin *PluginForward) Name() string
func (*PluginForward) Reload ¶
func (plugin *PluginForward) Reload() error
type PluginForwardEntry ¶
type PluginForwardEntry struct {
// contains filtered or unexported fields
}
type PluginGetSetPayloadSize ¶
type PluginGetSetPayloadSize struct{}
func (*PluginGetSetPayloadSize) Description ¶
func (plugin *PluginGetSetPayloadSize) Description() string
func (*PluginGetSetPayloadSize) Drop ¶
func (plugin *PluginGetSetPayloadSize) Drop() error
func (*PluginGetSetPayloadSize) Eval ¶
func (plugin *PluginGetSetPayloadSize) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginGetSetPayloadSize) Init ¶
func (plugin *PluginGetSetPayloadSize) Init(proxy *Proxy) error
func (*PluginGetSetPayloadSize) Name ¶
func (plugin *PluginGetSetPayloadSize) Name() string
func (*PluginGetSetPayloadSize) Reload ¶
func (plugin *PluginGetSetPayloadSize) Reload() error
type PluginNxLog ¶
type PluginNxLog struct {
// contains filtered or unexported fields
}
func (*PluginNxLog) Description ¶
func (plugin *PluginNxLog) Description() string
func (*PluginNxLog) Drop ¶
func (plugin *PluginNxLog) Drop() error
func (*PluginNxLog) Eval ¶
func (plugin *PluginNxLog) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginNxLog) Init ¶
func (plugin *PluginNxLog) Init(proxy *Proxy) error
func (*PluginNxLog) Name ¶
func (plugin *PluginNxLog) Name() string
func (*PluginNxLog) Reload ¶
func (plugin *PluginNxLog) Reload() error
type PluginQueryLog ¶
type PluginQueryLog struct {
// contains filtered or unexported fields
}
func (*PluginQueryLog) Description ¶
func (plugin *PluginQueryLog) Description() string
func (*PluginQueryLog) Drop ¶
func (plugin *PluginQueryLog) Drop() error
func (*PluginQueryLog) Eval ¶
func (plugin *PluginQueryLog) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginQueryLog) Init ¶
func (plugin *PluginQueryLog) Init(proxy *Proxy) error
func (*PluginQueryLog) Name ¶
func (plugin *PluginQueryLog) Name() string
func (*PluginQueryLog) Reload ¶
func (plugin *PluginQueryLog) Reload() error
type PluginQueryMeta ¶
type PluginQueryMeta struct {
// contains filtered or unexported fields
}
func (*PluginQueryMeta) Description ¶
func (plugin *PluginQueryMeta) Description() string
func (*PluginQueryMeta) Drop ¶
func (plugin *PluginQueryMeta) Drop() error
func (*PluginQueryMeta) Eval ¶
func (plugin *PluginQueryMeta) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginQueryMeta) Init ¶
func (plugin *PluginQueryMeta) Init(proxy *Proxy) error
func (*PluginQueryMeta) Name ¶
func (plugin *PluginQueryMeta) Name() string
func (*PluginQueryMeta) Reload ¶
func (plugin *PluginQueryMeta) Reload() error
type PluginWhitelistName ¶
type PluginWhitelistName struct {
// contains filtered or unexported fields
}
func (*PluginWhitelistName) Description ¶
func (plugin *PluginWhitelistName) Description() string
func (*PluginWhitelistName) Drop ¶
func (plugin *PluginWhitelistName) Drop() error
func (*PluginWhitelistName) Eval ¶
func (plugin *PluginWhitelistName) Eval(pluginsState *PluginsState, msg *dns.Msg) error
func (*PluginWhitelistName) Init ¶
func (plugin *PluginWhitelistName) Init(proxy *Proxy) error
func (*PluginWhitelistName) Name ¶
func (plugin *PluginWhitelistName) Name() string
func (*PluginWhitelistName) Reload ¶
func (plugin *PluginWhitelistName) Reload() error
type PluginsAction ¶
type PluginsAction int
type PluginsGlobals ¶
type PluginsReturnCode ¶
type PluginsReturnCode int
type PluginsState ¶
type PluginsState struct {
// contains filtered or unexported fields
}
func NewPluginsState ¶
func (*PluginsState) ApplyLoggingPlugins ¶
func (pluginsState *PluginsState) ApplyLoggingPlugins(pluginsGlobals *PluginsGlobals) error
func (*PluginsState) ApplyQueryPlugins ¶
func (pluginsState *PluginsState) ApplyQueryPlugins(pluginsGlobals *PluginsGlobals, packet []byte, needsEDNS0Padding bool) ([]byte, error)
func (*PluginsState) ApplyResponsePlugins ¶
func (pluginsState *PluginsState) ApplyResponsePlugins(pluginsGlobals *PluginsGlobals, packet []byte, ttl *uint32) ([]byte, error)
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) InitPluginsGlobals ¶
func (*Proxy) StartProxy ¶
func (proxy *Proxy) StartProxy()
func (*Proxy) SystemDListeners ¶
type QueryLogConfig ¶
type QuestionSizeEstimator ¶
func NewQuestionSizeEstimator ¶
func NewQuestionSizeEstimator() QuestionSizeEstimator
func (*QuestionSizeEstimator) MinQuestionSize ¶
func (questionSizeEstimator *QuestionSizeEstimator) MinQuestionSize() int
type RegisteredServer ¶
type RegisteredServer struct {
// contains filtered or unexported fields
}
type ServerBugs ¶
type ServerBugs struct {
// contains filtered or unexported fields
}
type ServerInfo ¶
type ServerInfo struct { Proto stamps.StampProtoType MagicQuery [8]byte ServerPk [32]byte CryptoConstruction CryptoConstruction Name string Timeout time.Duration URL *url.URL HostName string UDPAddr *net.UDPAddr TCPAddr *net.TCPAddr RelayUDPAddr *net.UDPAddr RelayTCPAddr *net.TCPAddr DOHClientCreds DOHClientCreds // contains filtered or unexported fields }
type ServerSummary ¶
type ServerSummary struct { Name string `json:"name"` Proto string `json:"proto"` IPv6 bool `json:"ipv6"` Addrs []string `json:"addrs,omitempty"` Ports []int `json:"ports"` DNSSEC bool `json:"dnssec"` NoLog bool `json:"nolog"` NoFilter bool `json:"nofilter"` Description string `json:"description,omitempty"` Stamp string `json:"stamp"` }
type ServersInfo ¶
func NewServersInfo ¶
func NewServersInfo() ServersInfo
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
type SourceConfig ¶
type SourceFormat ¶
type SourceFormat int
type StaticConfig ¶
type StaticConfig struct {
Stamp string
}
type TLSClientAuthConfig ¶
type TLSClientAuthConfig struct {
Creds []TLSClientAuthCredsConfig `toml:"creds"`
}
type TimeRangeStr ¶
type WeeklyRanges ¶
type WeeklyRanges struct {
// contains filtered or unexported fields
}
func (*WeeklyRanges) Match ¶
func (weeklyRanges *WeeklyRanges) Match() bool
type WeeklyRangesStr ¶
type WeeklyRangesStr struct {
Sun, Mon, Tue, Wed, Thu, Fri, Sat []TimeRangeStr
}
type WhitelistNameConfig ¶
type XTransport ¶
type XTransport struct {
// contains filtered or unexported fields
}
func NewXTransport ¶
func NewXTransport() *XTransport
Source Files ¶
- common.go
- config.go
- crypto.go
- dnscrypt_certs.go
- dnsutils.go
- estimators.go
- local-doh.go
- netprobe_others.go
- pattern_matcher.go
- plugin_block_ip.go
- plugin_block_ipv6.go
- plugin_block_name.go
- plugin_block_undelegated.go
- plugin_block_unqualified.go
- plugin_cache.go
- plugin_cloak.go
- plugin_firefox.go
- plugin_forward.go
- plugin_get_set_payload_size.go
- plugin_nx_log.go
- plugin_query_log.go
- plugin_querymeta.go
- plugin_whitelist_name.go
- plugins.go
- privilege_linux.go
- proxy.go
- resolve.go
- serversInfo.go
- service_linux.go
- sources.go
- systemd_linux.go
- time_ranges.go
- xtransport.go
Click to show internal directories.
Click to hide internal directories.