From 3b50caf4cd729c10777055879a418a8a569c8335 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 29 Nov 2019 08:53:13 +0100 Subject: [PATCH] Add a default local DoH path, print the URLs --- dnscrypt-proxy/config.go | 1 + dnscrypt-proxy/proxy.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dnscrypt-proxy/config.go b/dnscrypt-proxy/config.go index df046b5b..a76ca939 100644 --- a/dnscrypt-proxy/config.go +++ b/dnscrypt-proxy/config.go @@ -95,6 +95,7 @@ func newConfig() Config { return Config{ LogLevel: int(dlog.LogLevel()), ListenAddresses: []string{"127.0.0.1:53"}, + LocalDoH: LocalDoHConfig{Path: "/dns-query"}, Timeout: 5000, KeepAlive: 5, CertRefreshDelay: 240, diff --git a/dnscrypt-proxy/proxy.go b/dnscrypt-proxy/proxy.go index 48e025c2..6109ccf6 100644 --- a/dnscrypt-proxy/proxy.go +++ b/dnscrypt-proxy/proxy.go @@ -185,7 +185,7 @@ func (proxy *Proxy) addLocalDoHListener(listenAddrStr string) { } FileDescriptorNum++ - dlog.Noticef("Now listening to %v [DoH]", listenAddrStr) + dlog.Noticef("Now listening to https://%v%v [DoH]", listenAddrStr, proxy.localDoHPath) go proxy.localDoHListener(listenerTCP.(*net.TCPListener)) } @@ -324,7 +324,7 @@ func (proxy *Proxy) localDoHListenerFromAddr(listenAddr *net.TCPAddr) error { if err != nil { return err } - dlog.Noticef("Now listening to %v [DoH]", listenAddr) + dlog.Noticef("Now listening to https://%v%v [DoH]", listenAddr, proxy.localDoHPath) go proxy.localDoHListener(acceptPc) return nil }