Browse Source
interface: partially fix ipv6 proxy
note that network.deserialize_proxy is still broken for ipv6
regtest_lnd
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
2 additions and
2 deletions
-
electrum/interface.py
|
|
@ -33,7 +33,7 @@ from collections import defaultdict |
|
|
|
from ipaddress import IPv4Network, IPv6Network, ip_address |
|
|
|
|
|
|
|
import aiorpcx |
|
|
|
from aiorpcx import RPCSession, Notification |
|
|
|
from aiorpcx import RPCSession, Notification, NetAddress |
|
|
|
from aiorpcx.curio import timeout_after, TaskTimeout |
|
|
|
import certifi |
|
|
|
|
|
|
@ -218,7 +218,7 @@ class Interface(PrintError): |
|
|
|
auth = None |
|
|
|
else: |
|
|
|
auth = aiorpcx.socks.SOCKSUserAuth(username, pw) |
|
|
|
addr = "{}:{}".format(proxy['host'], proxy['port']) |
|
|
|
addr = NetAddress(proxy['host'], proxy['port']) |
|
|
|
if proxy['mode'] == "socks4": |
|
|
|
self.proxy = aiorpcx.socks.SOCKSProxy(addr, aiorpcx.socks.SOCKS4a, auth) |
|
|
|
elif proxy['mode'] == "socks5": |
|
|
|