Ignore onion servers if Tor is not being used
This commit is contained in:
parent
4940b34c76
commit
5c9edfccfe
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue