Fix logic for separating port and host for IPv6 literal addresses
This commit is contained in:
parent
e854fb1ad3
commit
81fb82479a
|
@ -245,7 +245,7 @@ def proxy(sock, host):
|
||||||
elif b':' not in remote_host:
|
elif b':' not in remote_host:
|
||||||
port = None
|
port = None
|
||||||
else:
|
else:
|
||||||
remote_host, port = remote_host.rsplit(b':')
|
remote_host, port = remote_host.rsplit(b':', 1)
|
||||||
try:
|
try:
|
||||||
port = int(port)
|
port = int(port)
|
||||||
if port < 1 or port > 0xffff: raise ValueError
|
if port < 1 or port > 0xffff: raise ValueError
|
||||||
|
|
Loading…
Reference in New Issue