mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 20:36:44 +00:00
handle null proxy configuration when fetching proxy
This commit is contained in:
parent
f245b57022
commit
a5050117a3
1 changed files with 1 additions and 1 deletions
|
@ -502,7 +502,7 @@ public class AppServices {
|
||||||
public static Proxy getProxy(String proxyCircuitId) {
|
public static Proxy getProxy(String proxyCircuitId) {
|
||||||
Config config = Config.get();
|
Config config = Config.get();
|
||||||
Proxy proxy = null;
|
Proxy proxy = null;
|
||||||
if(config.isUseProxy()) {
|
if(config.isUseProxy() && config.getProxyServer() != null) {
|
||||||
HostAndPort proxyHostAndPort = HostAndPort.fromString(config.getProxyServer());
|
HostAndPort proxyHostAndPort = HostAndPort.fromString(config.getProxyServer());
|
||||||
InetSocketAddress proxyAddress = new InetSocketAddress(proxyHostAndPort.getHost(), proxyHostAndPort.getPortOrDefault(ProxyTcpOverTlsTransport.DEFAULT_PROXY_PORT));
|
InetSocketAddress proxyAddress = new InetSocketAddress(proxyHostAndPort.getHost(), proxyHostAndPort.getPortOrDefault(ProxyTcpOverTlsTransport.DEFAULT_PROXY_PORT));
|
||||||
proxy = new Proxy(Proxy.Type.SOCKS, proxyAddress);
|
proxy = new Proxy(Proxy.Type.SOCKS, proxyAddress);
|
||||||
|
|
Loading…
Reference in a new issue