Print the server IP address instead of a full DNS stamp

Also allow the sdns scheme in api/index.html
pull/19/head
Frank Denis 2021-04-24 17:49:06 +02:00 committed by Karan Sharma
parent 6d2eae4f58
commit b7e0b497cf
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@
<div class="field">
<label for="address">Nameserver address</label>
<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">
To use different protocols like DOH, DOT etc. refer to the instructions
<a href="https://github.com/mr-karan/doggo#transport-options">here</a>.

View File

@ -36,7 +36,7 @@ func NewDNSCryptResolver(server string, dnscryptOpts DNSCryptResolverOpts, resol
return &DNSCryptResolver{
client: client,
serverInfo: serverInfo,
server: server,
server: serverInfo.ServerAddress,
resolverOptions: resolverOpts,
}, nil
}
@ -52,7 +52,7 @@ func (r *DNSCryptResolver) Lookup(question dns.Question) (Response, error) {
r.resolverOptions.Logger.WithFields(logrus.Fields{
"domain": msg.Question[0].Name,
"ndots": r.resolverOptions.Ndots,
"nameserver": r.serverInfo.ProviderName,
"nameserver": r.server,
}).Debug("Attempting to resolve")
in, rtt, err := r.client.Exchange(&msg, r.serverInfo)
if err != nil {