mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-14 07:13:09 +00:00
cast client port to int
This commit is contained in:
@@ -1005,7 +1005,7 @@ async def handle_proxy_protocol(reader, peer=None):
|
||||
if proxy_fam in (PROXY_TCP4, PROXY_TCP6):
|
||||
if len(proxy_addr) == 4:
|
||||
src_addr = proxy_addr[0].decode('ascii')
|
||||
src_port = proxy_addr[2].decode('ascii')
|
||||
src_port = int(proxy_addr[2].decode('ascii'))
|
||||
return (src_addr, src_port)
|
||||
elif proxy_fam == PROXY_UNKNOWN:
|
||||
return peer
|
||||
|
||||
Reference in New Issue
Block a user