qwj / python-proxy

HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/ShadowsocksR/SSH/Redirect/Pf TCP/UDP asynchronous tunnel proxy implemented in Python 3 asyncio.
MIT License
2.01k stars 338 forks source link

automatic port zero #142

Closed milahu closed 2 years ago

milahu commented 2 years ago

when i bind to port zero (automatically choose a free port), pproxy should print the actual port

actual output

$ pproxy -l http://127.0.0.1:0/ 
Serving on 127.0.0.1:0 by http

expected output

$ pproxy -l http://127.0.0.1:0/ 
Serving on 127.0.0.1:12345 by http

where 12345 is the actual port number