diff --git a/dnscrypt-proxy/xtransport.go b/dnscrypt-proxy/xtransport.go index 9dca1384..c9267d4e 100644 --- a/dnscrypt-proxy/xtransport.go +++ b/dnscrypt-proxy/xtransport.go @@ -224,6 +224,9 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string, } var err error host := url.Host + if xTransport.proxyDialer == nil && strings.HasSuffix(host, ".onion") { + return nil, 0, errors.New("Onion service is not reachable without Tor") + } resolveByProxy := false if xTransport.proxyDialer != nil || xTransport.httpProxyFunction != nil { resolveByProxy = true