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
|
var err error
|
||||||
host := url.Host
|
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
|
resolveByProxy := false
|
||||||
if xTransport.proxyDialer != nil || xTransport.httpProxyFunction != nil {
|
if xTransport.proxyDialer != nil || xTransport.httpProxyFunction != nil {
|
||||||
resolveByProxy = true
|
resolveByProxy = true
|
||||||
|
|
Loading…
Reference in New Issue