|
@@ -44,7 +44,9 @@ type DoHNameServer struct {
|
|
|
// NewDoHNameServer creates DOH client object for remote resolving
|
|
// NewDoHNameServer creates DOH client object for remote resolving
|
|
|
func NewDoHNameServer(url *url.URL, dispatcher routing.Dispatcher, clientIP net.IP) (*DoHNameServer, error) {
|
|
func NewDoHNameServer(url *url.URL, dispatcher routing.Dispatcher, clientIP net.IP) (*DoHNameServer, error) {
|
|
|
newError("DNS: created Remote DOH client for ", url.String()).AtInfo().WriteToLog()
|
|
newError("DNS: created Remote DOH client for ", url.String()).AtInfo().WriteToLog()
|
|
|
- newError("DNS: Remote DOH client ", url.String(), " use clientip ", clientIP.String()).AtInfo().WriteToLog()
|
|
|
|
|
|
|
+ if clientIP != nil {
|
|
|
|
|
+ newError("DNS: Remote DOH client ", url.String(), " uses clientip ", clientIP.String()).AtInfo().WriteToLog()
|
|
|
|
|
+ }
|
|
|
s := baseDOHNameServer(url, "DOH", clientIP)
|
|
s := baseDOHNameServer(url, "DOH", clientIP)
|
|
|
|
|
|
|
|
// Dispatched connection will be closed (interrupted) after each request
|
|
// Dispatched connection will be closed (interrupted) after each request
|
|
@@ -108,7 +110,9 @@ func NewDoHLocalNameServer(url *url.URL, clientIP net.IP) *DoHNameServer {
|
|
|
Transport: tr,
|
|
Transport: tr,
|
|
|
}
|
|
}
|
|
|
newError("DNS: created Local DOH client for ", url.String()).AtInfo().WriteToLog()
|
|
newError("DNS: created Local DOH client for ", url.String()).AtInfo().WriteToLog()
|
|
|
- newError("DNS: Local DOH client ", url.String(), " use clientip ", clientIP.String()).AtInfo().WriteToLog()
|
|
|
|
|
|
|
+ if clientIP != nil {
|
|
|
|
|
+ newError("DNS: Local DOH client ", url.String(), " uses clientip ", clientIP.String()).AtInfo().WriteToLog()
|
|
|
|
|
+ }
|
|
|
return s
|
|
return s
|
|
|
}
|
|
}
|
|
|
|
|
|