mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 18:25:21 +00:00
interface: partially fix ipv6 proxy
note that network.deserialize_proxy is still broken for ipv6
This commit is contained in:
parent
19ced234aa
commit
556fa30ddf
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ from collections import defaultdict
|
||||||
from ipaddress import IPv4Network, IPv6Network, ip_address
|
from ipaddress import IPv4Network, IPv6Network, ip_address
|
||||||
|
|
||||||
import aiorpcx
|
import aiorpcx
|
||||||
from aiorpcx import RPCSession, Notification
|
from aiorpcx import RPCSession, Notification, NetAddress
|
||||||
from aiorpcx.curio import timeout_after, TaskTimeout
|
from aiorpcx.curio import timeout_after, TaskTimeout
|
||||||
import certifi
|
import certifi
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ class Interface(PrintError):
|
||||||
auth = None
|
auth = None
|
||||||
else:
|
else:
|
||||||
auth = aiorpcx.socks.SOCKSUserAuth(username, pw)
|
auth = aiorpcx.socks.SOCKSUserAuth(username, pw)
|
||||||
addr = "{}:{}".format(proxy['host'], proxy['port'])
|
addr = NetAddress(proxy['host'], proxy['port'])
|
||||||
if proxy['mode'] == "socks4":
|
if proxy['mode'] == "socks4":
|
||||||
self.proxy = aiorpcx.socks.SOCKSProxy(addr, aiorpcx.socks.SOCKS4a, auth)
|
self.proxy = aiorpcx.socks.SOCKSProxy(addr, aiorpcx.socks.SOCKS4a, auth)
|
||||||
elif proxy['mode'] == "socks5":
|
elif proxy['mode'] == "socks5":
|
||||||
|
|
Loading…
Add table
Reference in a new issue