mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-10 16:43:14 +00:00
avoid server address resolution for public servers, and assume non local for failures where a proxy is configured
This commit is contained in:
@@ -118,7 +118,8 @@ public class ElectrumServer {
|
||||
previousServer = electrumServer;
|
||||
|
||||
HostAndPort hostAndPort = electrumServer.getHostAndPort();
|
||||
boolean localNetworkAddress = !protocol.isOnionAddress(hostAndPort) && IpAddressMatcher.isLocalNetworkAddress(hostAndPort.getHost());
|
||||
boolean localNetworkAddress = !Protocol.isOnionAddress(hostAndPort) && !PublicElectrumServer.isPublicServer(hostAndPort)
|
||||
&& IpAddressMatcher.isLocalNetworkAddress(hostAndPort.getHost());
|
||||
|
||||
if(!localNetworkAddress && Config.get().isUseProxy() && proxyServer != null && !proxyServer.isBlank()) {
|
||||
HostAndPort proxy = HostAndPort.fromString(proxyServer);
|
||||
|
||||
Reference in New Issue
Block a user