MCPcopy Index your code

hub / github.com/honwen/aiodns / functions

Functions80 in github.com/honwen/aiodns

↓ 18 callersMethodSet
Set implements the [flag.Value] interface for *uint32Value.
internal/cmd/flag.go:19
↓ 6 callersMethodString
String implements the [flag.Value] interface for *uint32Value.
internal/cmd/flag.go:27
↓ 6 callersFunctionscanDoamins
(dat []byte, filter func(string) bool)
main.go:82
↓ 4 callersFunctiondefineFlag
defineFlag defines a flag with specified setFlag function. o must not be nil.
internal/cmd/args.go:489
↓ 4 callersFunctiondefineFlagVar
defineFlagVar defines a flag with the specified [flag.Value] value. o must not be nil.
internal/cmd/args.go:502
↓ 4 callersFunctionreply
reply creates a new response message replying to req with the given code.
internal/dnsmsg/constructor.go:108
↓ 3 callersFunctionhdr
hdr creates a new DNS header with the given name and RR type.
internal/handler/constructor.go:86
↓ 3 callersFunctionloadServersList
loadServersList loads a list of DNS servers from the specified list. The thing is that the user may specify either a server address or the path to a
internal/cmd/proxy.go:487
↓ 2 callersMethodByName
ByName implements the [hostsfile.Storage] interface for [emptyStorage].
internal/handler/hosts.go:33
↓ 2 callersFunctionRunProxy
RunProxy starts and runs the proxy. l must not be nil. TODO(e.burkov): Move into separate dnssvc package.
internal/cmd/cmd.go:84
↓ 2 callersFunctioncliErrorExit
(c *cli.Context, err error)
main.go:47
↓ 2 callersFunctionfetch
(uri string, resolvers []string)
main.go:53
↓ 2 callersFunctionisEmpty
isEmpty returns false if uc contains at least a single upstream. uc must not be nil. TODO(e.burkov): Think of a better way to validate the config.
internal/cmd/proxy.go:120
↓ 2 callersFunctionparseCmdLineOptions
parseCmdLineOptions parses the command-line options. conf must not be nil.
internal/cmd/args.go:410
↓ 2 callersFunctionusage
usage prints a usage message similar to the one printed by package flag but taking long vs. short versions into account as well as using more informat
internal/cmd/args.go:552
↓ 1 callersMethodByAddr
ByAddr implements the [hostsfile.Storage] interface for [emptyStorage].
internal/handler/hosts.go:28
↓ 1 callersMethodNewCompressedResponse
NewCompressedResponse creates a new compressed response message for req with the given response code.
internal/handler/constructor.go:17
↓ 1 callersMethodNewCompressedResponse
NewCompressedResponse implements the [messageConstructor] interface for defaultConstructor.
internal/handler/constructor.go:43
↓ 1 callersFunctionNewDefault
NewDefault creates a new [Default] handler.
internal/handler/default.go:37
↓ 1 callersMethodNewIPResponse
NewIPResponse creates a new A/AAAA response message for req with the given IP addresses. All IP addresses must be of the same family.
internal/handler/constructor.go:26
↓ 1 callersMethodNewMsgNODATA
NewMsgNODATA creates a new empty response message replying to req with the NOERROR code. See https://www.rfc-editor.org/rfc/rfc2308#section-2.2.
internal/dnsmsg/constructor.go:29
↓ 1 callersMethodNewPTRAnswer
NewPTRAnswer creates a new resource record for PTR response with the given FQDN and PTR domain. Arguments must be fully qualified domain names.
internal/handler/constructor.go:22
↓ 1 callersFunctionReadHosts
ReadHosts reads the hosts files from the file system and returns a storage with parsed records. strg is always usable even if an error occurred.
internal/handler/hosts.go:39
↓ 1 callersFunctionaddOption
addOption adds the command-line option described by o to flags using fieldPtr as the pointer to the value.
internal/cmd/args.go:524
↓ 1 callersFunctioncreateProxyConfig
TODO(e.burkov): Use a separate type for the YAML Configuration file. createProxyConfig initializes [proxy.Config]. l must not be nil.
internal/cmd/proxy.go:34
↓ 1 callersFunctioncurl
(url string, resolvers []string, retry int)
curl.go:16
↓ 1 callersFunctiondefaultHostsPaths
defaultHostsPaths returns default paths to hosts files for UNIX.
internal/netutil/paths_unix.go:8
↓ 1 callersFunctiondefineTimeutilDurationFlag
defineTimeutilDurationFlag defines a flag with for the specified [*timeutil.Duration] pointer and command line option. o must not be nil.
internal/cmd/args.go:511
↓ 1 callersFunctiongenAnswersWithIPv4s
genAnswersWithIPv4s generates DNS A answers provided IPv4 addresses. If any of the IPs isn't an IPv4 address, genAnswersWithIPv4s logs a warning and
internal/handler/constructor.go:122
↓ 1 callersMethodhaltAAAA
haltAAAA halts the processing of AAAA requests if IPv6 is disabled. req must not be nil.
internal/handler/ipv6halt.go:11
↓ 1 callersMethodhostsFiles
hostsFiles returns the list of hosts files to resolve from. It's empty if resolving from hosts files is disabled.
internal/cmd/proxy.go:519
↓ 1 callersMethodinitBogusNXDomain
initBogusNXDomain inits BogusNXDomain structure.
internal/cmd/proxy.go:276
↓ 1 callersFunctioninitBootstrap
initBootstrap initializes the [upstream.Resolver] for bootstrapping upstream servers. It returns the default resolver if no bootstraps were specified
internal/cmd/proxy.go:216
↓ 1 callersMethodinitDNSCryptConfig
initDNSCryptConfig inits the DNSCrypt config.
internal/cmd/proxy.go:312
↓ 1 callersFunctioninitDNSCryptListenAddrs
initDNSCryptListenAddrs sets up proxy Configuration DNSCrypt listen addresses.
internal/cmd/proxy.go:420
↓ 1 callersMethodinitEDNS
initEDNS inits EDNS-related config fields.
internal/cmd/proxy.go:252
↓ 1 callersMethodinitListenAddrs
initListenAddrs sets up proxy Configuration listen IP addresses.
internal/cmd/proxy.go:367
↓ 1 callersMethodinitPrivateSubnets
initSubnets sets the private subnets Configuration into conf.
internal/cmd/proxy.go:464
↓ 1 callersMethodinitSubnets
initSubnets sets the DNS64 Configuration into conf. TODO(d.kolyshev): Join errors.
internal/cmd/proxy.go:443
↓ 1 callersMethodinitTLSConfig
initTLSConfig inits the TLS config.
internal/cmd/proxy.go:297
↓ 1 callersFunctioninitTLSListenAddrs
initTLSListenAddrs sets up proxy Configuration TLS listen addresses.
internal/cmd/proxy.go:395
↓ 1 callersMethodinitUpstreams
initUpstreams inits upstream-related config fields. TODO(d.kolyshev): Join errors.
internal/cmd/proxy.go:132
↓ 1 callersFunctionloadX509KeyPair
loadX509KeyPair reads and parses a public/private key pair from a pair of files. The files must contain PEM encoded data. The certificate file may c
internal/cmd/tls.go:53
↓ 1 callersFunctionnewAnswerA
newAnswerA creates a DNS A answer for req with the given IP address.
internal/handler/constructor.go:104
↓ 1 callersFunctionnewAnswerAAAA
newAnswerAAAA creates a DNS AAAA answer for req with the given IP address.
internal/handler/constructor.go:112
↓ 1 callersFunctionnewIntSliceValue
newIntSliceValue returns a pointer to intSliceValue with the given value.
internal/cmd/flag.go:62
↓ 1 callersFunctionnewStringSliceValue
newStringSliceValue returns a pointer to stringSliceValue with the given value.
internal/cmd/flag.go:120
↓ 1 callersFunctionnewTLSConfig
NewTLSConfig returns the TLS config that includes a certificate. Use it for server TLS Configuration or for a client certificate. If caPath is empty
internal/cmd/tls.go:12
↓ 1 callersFunctionparseConfig
parseConfig returns options parsed from the command args or config file. If no options have been parsed, it returns a suitable exit code and an error
internal/cmd/config.go:207
↓ 1 callersFunctionparseConfigFile
parseConfigFile fills options with the settings from file read by the given path.
internal/cmd/config.go:256
↓ 1 callersFunctionparseListenAddrs
parseListenAddrs returns a slice of listen IP addresses from the given options. In case no addresses are specified by options returns a slice with th
internal/cmd/proxy.go:344
↓ 1 callersFunctionprocessCmdLineOptions
processCmdLineOptions decides if dnsproxy should exit depending on the results of command-line option parsing.
internal/cmd/args.go:593
↓ 1 callersFunctionreadHostsFile
readHostsFile reads the hosts file at path and parses it into strg.
internal/handler/hosts.go:74
↓ 1 callersFunctionreply
reply creates a DNS response for req.
internal/handler/constructor.go:96
↓ 1 callersMethodresolveFromHosts
resolveFromHosts resolves the DNS query from the hosts file. It fills the response with the A, AAAA, and PTR records from the hosts file.
internal/handler/hosts.go:94
↓ 1 callersFunctionrunPprof
runPprof runs pprof server on localhost:6060. TODO(e.burkov): Add debugsvc.
internal/cmd/cmd.go:125
↓ 1 callersFunctionwriteUsageLine
writeUsageLine writes the usage line for the provided command-line option.
internal/cmd/args.go:573
FunctionDefaultHostsPaths
DefaultHostsPaths returns the slice of default paths to system hosts files. TODO(s.chzhen): Since [fs.FS] is no longer needed, update the [hostsfile
internal/netutil/paths.go:7
MethodHandleRequest
HandleRequest resolves the DNS request within proxyCtx. It only calls [proxy.Proxy.Resolve] if the request isn't handled by any of the internal handl
internal/handler/default.go:56
FunctionMain
Main is the entrypoint of dnsproxy CLI. Main may accept arguments, such as embedded assets and command-line arguments.
internal/cmd/cmd.go:23
MethodNewIPResponse
NewIPResponse implements the [messageConstructor] interface for [defaultConstructor]
internal/handler/constructor.go:61
MethodNewMsgNODATA
NewMsgNODATA implements the [MessageConstructor] interface for DefaultMessageConstructor.
internal/dnsmsg/constructor.go:72
MethodNewMsgNOTIMPLEMENTED
NewMsgNOTIMPLEMENTED creates a new response message replying to req with the NOTIMPLEMENTED code.
internal/dnsmsg/constructor.go:23
MethodNewMsgNOTIMPLEMENTED
NewMsgNOTIMPLEMENTED implements the [MessageConstructor] interface for DefaultMessageConstructor.
internal/dnsmsg/constructor.go:53
MethodNewMsgNXDOMAIN
NewMsgNXDOMAIN creates a new response message replying to req with the NXDOMAIN code.
internal/dnsmsg/constructor.go:15
MethodNewMsgNXDOMAIN
NewMsgNXDOMAIN implements the [MessageConstructor] interface for DefaultMessageConstructor.
internal/dnsmsg/constructor.go:41
MethodNewMsgSERVFAIL
NewMsgSERVFAIL creates a new response message replying to req with the SERVFAIL code.
internal/dnsmsg/constructor.go:19
MethodNewMsgSERVFAIL
NewMsgSERVFAIL implements the [MessageConstructor] interface for DefaultMessageConstructor.
internal/dnsmsg/constructor.go:47
MethodNewPTRAnswer
NewPTRAnswer implements the [messageConstructor] interface for [defaultConstructor].
internal/handler/constructor.go:52
FunctionParseSubnet
ParseSubnet parses s either as a CIDR prefix itself, or as an IP address, returning the corresponding single-IP CIDR prefix. TODO(e.burkov): Replace
internal/netutil/netutil.go:17
MethodSet
Set implements the [flag.Value] interface for *float32Value.
internal/cmd/flag.go:38
MethodSet
Set implements the [flag.Value] interface for *intSliceValue.
internal/cmd/flag.go:73
MethodSet
Set implements the [flag.Value] interface for *stringSliceValue.
internal/cmd/flag.go:131
MethodString
String implements the [flag.Value] interface for *float32Value.
internal/cmd/flag.go:46
MethodString
String implements the [flag.Value] interface for *intSliceValue.
internal/cmd/flag.go:90
MethodString
String implements the [flag.Value] interface for *stringSliceValue.
internal/cmd/flag.go:143
FunctiondefaultHostsPaths
defaultHostsPaths returns default paths to hosts files for Windows.
internal/netutil/paths_windows.go:13
Functioninit
()
init.go:24
Functioninit
()
main.go:112
Functionmain
()
main.go:122