These are chat archives for anacrolix/torrent

8th
Nov 2018
Matt Joiner
@anacrolix
Nov 08 2018 00:57 UTC
@elgatito the connections you're seeing on your router are connection tracking, where the router remembers the destinations for udp packets and knows to send responses back to the originator on the LAN. they're not necessarily bittorrent peer connections (utp/tcp). tcp/utp peer addresses are identical in bittorrent, there's no distinguishing them, you just have to try with both utp/tcp and see which ones respond. udp trackers are entirely separate to dht, but would generate udp connection entries in the router's connection tracker (all outgoing udp traffic will do this)
so with utp disabled, and dht enabled, you'll still see a lot of udp connections on the router, that's normal traffic. it's still too high by the sounds of it tho. the rate is currently 10 new address contacts per second, which will result in up to 10*(router's udp connection tracking timeout in seconds) total connections on the router just for dht alone. that won't include connections tracked for replies, utp, udp tracker etc.
YouROK
@YouROK
Nov 08 2018 02:50 UTC
When I
YouROK
@YouROK
Nov 08 2018 02:57 UTC
When I download via qbittorrent with DHT and the connection is about 200-400, and in this situation there are about 1000 for each torrent
Denis
@elgatito
Nov 08 2018 06:06 UTC
@anacrolix with disabled utp i see more than 5k connections on the router
Anyway, i would like not to see udp connections made to peers if i dont want udp
Matt Joiner
@anacrolix
Nov 08 2018 06:40 UTC
@YouROK Thanks for weighing in, it's helpful to know what kind of connection counts you're seeing. @elgatito I think there's a misunderstanding, DHT only operates over UDP, there's no way around it. If you want to disable use of UDP entirely, you'd have to disable both DHT and UTP. It might be possible to proxy UTP, in which case on the client side it would appear TCP connections to the proxy. I'm still figuring out that out.
Denis
@elgatito
Nov 08 2018 06:43 UTC
No, proxied udp looks like tcp from your side, comes with udp to the client
If we ping peers in dht, why we ping only with udp if they can support both?
Matt Joiner
@anacrolix
Nov 08 2018 06:45 UTC
UDP and uTP are not the same thing. We could proxy DHT UDP packets over SOCKS5?
Denis
@elgatito
Nov 08 2018 06:46 UTC
Depends if proxy supports that, but usuallh yes
Anyway, making thousands of connections is not good?
Matt Joiner
@anacrolix
Nov 08 2018 06:48 UTC
Definitely not good. Are you separately wanting to proxy DHT packets too?
I'm considering writing a rate-limiter that emulates the connection tracking on routers, then applying it to DHT and torrent connections.
Denis
@elgatito
Nov 08 2018 06:49 UTC
If we need to use proxy - we need to use it everywhere, otherwise if makes no sense for people behind tracking authorities
Matt Joiner
@anacrolix
Nov 08 2018 06:50 UTC
As it's currently written, when ProxyURL is set, there should be no uTP traffic at all. Are you able to verify that?
I think you'd have to run with DisableTCP: true, and see that nothing useful happens, or check some of the debug/vars output and see that no uTP connections are successful
Denis
@elgatito
Nov 08 2018 06:51 UTC
Have to check it. Can we add protocol to the info page? There is only port there in the connections list
Matt Joiner
@anacrolix
Nov 08 2018 06:51 UTC
It might be necessary to have another option that disables listening then, since if you want to operate behind a proxy, but are still receiving connections, some may still come through directly.
flags: c-eIU-c
the U is uTP
in the connection list
Denis
@elgatito
Nov 08 2018 06:52 UTC
Oh, good
Matt Joiner
@anacrolix
Nov 08 2018 06:54 UTC
in debug/vars, there's "network dialed first: udp": 752, "accepted conn network=udp": 756520, "accepted on udp listener": 756520, and any entry in completedHandshakeConnectionFlags that contains the U
like for example "EIU": 258,
means encrypted incoming utp connection
Denis
@elgatito
Nov 08 2018 06:56 UTC
For me disabling any protocol means disabling communication between peers with that protocol. While communication with trackers should not be influenced by that
I will check what connections are used (tcp or udp) when udp is disabled but i get good download speed
With proxyurl udp connections might not work currently, but they definitelg wont go directly and i see direct connections. Probably from dht?
For the moment, i'd go with limiting outcoming cinnections in dht. That would help a lot. Maybe configurable, like N per second
Denis
@elgatito
Nov 08 2018 22:22 UTC
interesting. starting client with DHT, but without UTP, not adding anything, status is empty, just idling
but router says there are 8-9k connections outgoing (most are dead and so on), but still, 9k connections just after started dht..
after adding torrent number of connections raise not so fast
Denis
@elgatito
Nov 08 2018 22:28 UTC
and with disableUTP I don't see UDP connections coming out
@anacrolix am i understanding it right: dht is getting peers from trackers, then ping each other via udp, if it's alive - return peer to the torrent library, which is trying to connect to that peer with all the enabled protocols?