all: imp script, code
This commit is contained in:
@@ -626,7 +626,8 @@ func separateUpstream(upstreamStr string) (upstreams, domains []string, err erro
|
|||||||
// properly.
|
// properly.
|
||||||
type healthCheckFunc func(u upstream.Upstream) (err error)
|
type healthCheckFunc func(u upstream.Upstream) (err error)
|
||||||
|
|
||||||
// checkExchange checks if the DNS upstream exchanges correctly.
|
// checkExchange is a [healthCheckFunc] that checks if the DNS upstream
|
||||||
|
// exchanges correctly.
|
||||||
func checkExchange(u upstream.Upstream) (err error) {
|
func checkExchange(u upstream.Upstream) (err error) {
|
||||||
// testTLD is the special-use fully-qualified domain name for testing the
|
// testTLD is the special-use fully-qualified domain name for testing the
|
||||||
// DNS server reachability.
|
// DNS server reachability.
|
||||||
@@ -657,8 +658,8 @@ func checkExchange(u upstream.Upstream) (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkPrivateExchange checks if the upstream for resolving private addresses
|
// checkPrivateExchange is a [healthCheckFunc] that checks if the upstream for
|
||||||
// exchanges correctly.
|
// resolving private addresses exchanges correctly.
|
||||||
//
|
//
|
||||||
// TODO(e.burkov): Think about testing the ip6.arpa. as well.
|
// TODO(e.burkov): Think about testing the ip6.arpa. as well.
|
||||||
func checkPrivateExchange(u upstream.Upstream) (err error) {
|
func checkPrivateExchange(u upstream.Upstream) (err error) {
|
||||||
@@ -702,9 +703,9 @@ func (err domainSpecificTestError) Error() (msg string) {
|
|||||||
return fmt.Sprintf("WARNING: %s", err.error)
|
return fmt.Sprintf("WARNING: %s", err.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkUpstreamAddr creates the DNS upstream using opts and information from
|
// checkUpstreamAddr creates the upstream using opts and, possibly, information
|
||||||
// system hosts files. Checks if the DNS upstream exchanges correctly. It
|
// from system hosts files, then checks if the DNS upstream exchanges correctly.
|
||||||
// returns an error if addr is not valid DNS upstream address or the upstream
|
// It returns an error if addr is not valid DNS upstream address or the upstream
|
||||||
// is not exchanging correctly.
|
// is not exchanging correctly.
|
||||||
//
|
//
|
||||||
// TODO(e.burkov): Remove the receiver.
|
// TODO(e.burkov): Remove the receiver.
|
||||||
@@ -767,8 +768,8 @@ type checkResult = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// checkDNS parses an upstream configuration line using opts and checks if the
|
// checkDNS parses an upstream configuration line using opts and checks if the
|
||||||
// specified upstreams are working using check. addWG is decremented when the
|
// specified upstreams are working using check. countWG is decremented when the
|
||||||
// expected number of results is added to resWG, then results are sent to resCh.
|
// expected number of results added to resNum, then results are sent to resCh.
|
||||||
//
|
//
|
||||||
// TODO(e.burkov): Remove the receiver.
|
// TODO(e.burkov): Remove the receiver.
|
||||||
func (s *Server) checkDNS(
|
func (s *Server) checkDNS(
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ set -f -u
|
|||||||
go_version="$( "${GO:-go}" version )"
|
go_version="$( "${GO:-go}" version )"
|
||||||
readonly go_version
|
readonly go_version
|
||||||
|
|
||||||
go_min_version='go1.20.10'
|
go_min_version='go1.20.11'
|
||||||
go_version_msg="
|
go_version_msg="
|
||||||
warning: your go version (${go_version}) is different from the recommended minimal one (${go_min_version}).
|
warning: your go version (${go_version}) is different from the recommended minimal one (${go_min_version}).
|
||||||
if you have the version installed, please set the GO environment variable.
|
if you have the version installed, please set the GO environment variable.
|
||||||
|
|||||||
Reference in New Issue
Block a user