bittorrent

Peers reported but do not connect on a self-hosted bittorrent tracker


I'm at a loss. I am trying to set up a private tracker for a friend (to distribute his content). He has a VPS, so I thought I would just install opentracker and be done with it. However, I've encountered a problem, or rather a multitude of problems:

NB: in all that follows the trackers are open and do not contain whitelists or such. In all the cases the clients get the correct number of peers. In all the cases, one of the peers has the file the other tries to download it.

#############################################

[2 Peers on same LAN]

[2 Peers on different LANs]

#############################################

The clients used are Transmission and Ktorrent.

I tried dissecting the communication using Wireshark. The response to the GET request seems to vary randomly at different parts of the day for the same setup. Sometimes the peers12 contains nothing. Sometimes it contains something like \177\000\000\001 which is obviously not my IP. Sometimes it transforms into peers18 and contains someting weird. One time it just spontaneously started responding with peers6.

I tried placing the servers behind a reverse proxy and not. I've tried adding the IP to the request both in-client (activating the option to use it in opentracker) and in-nginx by rewriting the request. But when I tried it on the same LAN and it didn't work I realised that was not the problem.

To resume, from the clients' perspective, the amount of peers is right but it connects to none of them and the clients do not show them in the lists of peers. Sometimes though it starts to work spontaneously (2 times only on same LAN in more than 50 hours of testing). I think I'm missing something trivial here.

If anyone has any idea... please go ahead. I can setup the VPS as a playground for a bit so that I can try out any solutions anyone has.


Solution

  • The problem appears to be with the main computer I used to run tests. Turning on uTP allowed local connections. However it did not allow me to seed to an outside computer. Another computer on the same LAN however had no problem doing that. So, the problem is client-side and non-reproducible on another computer it would seem.