Print the server IP address instead of a full DNS stamp
Also allow the sdns scheme in api/index.htmlpull/19/head
parent
6d2eae4f58
commit
b7e0b497cf
|
@ -49,7 +49,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="address">Nameserver address</label>
|
<label for="address">Nameserver address</label>
|
||||||
<input id="address" name="address" type="text" placeholder="tcp://your-ip"
|
<input id="address" name="address" type="text" placeholder="tcp://your-ip"
|
||||||
required pattern="(tcp|udp|tls|https):\/\/(.*)" />
|
required pattern="(tcp|udp|tls|https|sdns):\/\/(.*)" />
|
||||||
<p class="help">
|
<p class="help">
|
||||||
To use different protocols like DOH, DOT etc. refer to the instructions
|
To use different protocols like DOH, DOT etc. refer to the instructions
|
||||||
<a href="https://github.com/mr-karan/doggo#transport-options">here</a>.
|
<a href="https://github.com/mr-karan/doggo#transport-options">here</a>.
|
||||||
|
|
|
@ -36,7 +36,7 @@ func NewDNSCryptResolver(server string, dnscryptOpts DNSCryptResolverOpts, resol
|
||||||
return &DNSCryptResolver{
|
return &DNSCryptResolver{
|
||||||
client: client,
|
client: client,
|
||||||
serverInfo: serverInfo,
|
serverInfo: serverInfo,
|
||||||
server: server,
|
server: serverInfo.ServerAddress,
|
||||||
resolverOptions: resolverOpts,
|
resolverOptions: resolverOpts,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ func (r *DNSCryptResolver) Lookup(question dns.Question) (Response, error) {
|
||||||
r.resolverOptions.Logger.WithFields(logrus.Fields{
|
r.resolverOptions.Logger.WithFields(logrus.Fields{
|
||||||
"domain": msg.Question[0].Name,
|
"domain": msg.Question[0].Name,
|
||||||
"ndots": r.resolverOptions.Ndots,
|
"ndots": r.resolverOptions.Ndots,
|
||||||
"nameserver": r.serverInfo.ProviderName,
|
"nameserver": r.server,
|
||||||
}).Debug("Attempting to resolve")
|
}).Debug("Attempting to resolve")
|
||||||
in, rtt, err := r.client.Exchange(&msg, r.serverInfo)
|
in, rtt, err := r.client.Exchange(&msg, r.serverInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue