-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Bug: DHT doesn't work under any proxy #6053
Comments
please be more specific |
@arvidn I used the WinGate proxy server with the latest, working version of the library 1.2.13. |
@arvidn I just checked. In Utorrent DHT works through socks4 proxy. Libtorrent does not. I used similar settings and the same proxy. |
@arvidn I checked how Libretorrent works. There proxy never starts at startup and if it is applied after startup, DHT doesn't work. |
@arvidn There are a lot of problems:
|
can you provide a wireshark dump of the packets sent to and from the SOCKS5 proxy? |
This message is the SOCKS5 handshake. I don't see the proxy respond.
I also don't see any UDP traffic going to the proxy, presumably because it got stuck handshaking. The server is definitely supposed to respond, but it isn't. The protocol is specified here. Are you sure your proxy is supposed to support SOCKS5? |
@arvidn This is the first proxy server to be found in a Google search. Wingate - you can install it yourself and check it out. It's free. I made a mistake last time. The proxy service was disabled. I just recorded a log with the service turned on. |
as you can see in your wireshark dump, the exact same behavior is exhibited. The proxy server does not respond to the SOCKS5 handshake. Perhaps you could try to use SOCKS4 instead. |
@arvidn Similarly, it doesn't work with SOCKS4. I checked all kinds of proxies. |
Do any of them respond to the SOCKS handshake? |
@arvidn I don't understand and I don't know. How can I check it? Wouldn't it be better if you checked it yourself? I spent all evening trying to set up a proxy for DHT. And it didn't work. |
It's possible that uTorrent is not using the Socks 4 proxy for its DHT, just bypassing it and using the regular IPv4 internet connection. |
this may be of help finding DHT download history for an ip. |
@arvidn Okay. Give me the name of a proxy server (proxy server for Windows 10) which I can use with libtorrent? |
@arvidn This is a very big and important problem that needs to be dealt with more as a priority. |
please feel free to trouble shoot. You can collect a wireshark dump of libtorrent talking to a proxy and some other program talking to it (using UDP). That would be a good start to see if libtorrent speaks socks5 incorrectly. |
I confirm that DHT connections do not work through the SOCKS5 proxy. Tried While investigating DNS leak in Tribler, my Wireshark dumps of Here is the test line I used (using Also, even with |
@ichorid would you mind creating a separate ticket for the DNS leak? Have you seen any other application successfully tunnel UDP via an |
You're right! OpenSSH SOCKS5 implementation does not support UDP forwarding! (I've checked their source code, not signs of UDP support) I'll try to check it with Dante or something. |
Please just make an option to bypass the proxy for DHT. Because the most time proxy is needed just to reach trackers (blocked by ISP), not for the DHT nodes. |
FWIW: you can consider using docker to do complex networking management, if it fits your use case. It's a nice way to do app-specific networking that isn't normally possible with e.g. iptables. I end up running torrent clients with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still not working |
Could be actually related to #6512 |
double |
@arvidn |
@proninyaroslav I have not observed the problem. Do you have a wireshark dump demonstrating the issue? |
I make some dumps here #4078 |
I second the suggestion for adding option to use direct connection for DHT even if proxy is used for connection to tracker/announcer. |
I confirm that DHT nodes are always 0 when using Shadowsocks SOCKS5 proxy(in UDP mode) for tracker connections. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@arvidn libtorrent version (or branch): any
platform/architecture: any
compiler and compiler version: any
DHT doesn't work under any proxy.
A continuation of this problem:
#4078
The text was updated successfully, but these errors were encountered: