Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add support for SOCKS5 BIND #7793

Open
0xThiebaut opened this issue Nov 12, 2024 · 2 comments
Open

Feature: Add support for SOCKS5 BIND #7793

0xThiebaut opened this issue Nov 12, 2024 · 2 comments

Comments

@0xThiebaut
Copy link
Contributor

Currently accepting inbound connections when a proxy is present relies on proxy_accept_incoming (#7726), optionally with a mixture of announce_ip and announce_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 the BIND 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?

@arvidn
Copy link
Owner

arvidn commented Nov 12, 2024

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.

@0xThiebaut
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants