Open 0xThiebaut opened 1 day ago
As far as I know, SOCKS5 BIND is already supported, as well as UDP ASSOCIATE for incoming TCP and uTP connections respectively.
BIND isn't quite meant for this use case, so it doesn't necessarily work that well with most proxies.
I know that outbound connectivity is implemented (CONNECT for TCP, ASSOCIATE for UDP) and, through hole-punching, it also provides inbound UDP. But inbound TCP would need BIND which I don't see being attempted. Is this located behind a specific setting?
Currently accepting inbound connections when a proxy is present relies on
proxy_accept_incoming
(#7726), optionally with a mixture ofannounce_ip
andannounce_port
. This however causes a tight configuration coupling between the proxy and libtorrent where libtorrent needs to announce the proxy's listen port or vice versa. The SOCKS5 protocol provides functionality to accept inbound TCP connections through theBIND
operation. This issue is to discuss whether we could add support for this into libtorrent and, if so, which approach would be best.If implemented, it would enable libtorrent to negotiate a working TCP listening port with compatible SOCKS5 proxies and ensure this is automatically announced to TCP-based trackers.
@arvidn is this something you could see added into libtorrent?