Recommended Posts

Hmmm... you raise a good point - and neither the "Search LAN" or "Search DHT network" options are currently covered in the User Guide!

I would assume if BitTorrent Sync is struggling to locate your other devices, enabling "Search DHT network" would help in some way? (although quite how this is different from the "Use tracker server" option, I'm not sure!)

Anyway, hopefully the devs will see this post, and update the User Guide accordingly.

Link to post
Share on other sites

Idea is that if you want to go completely server less, DHT is one of the option to connect peers over internet. Pros: is that DHT is always accessible and is not hosted by any company. Cons: DHT is bad in doing hole punching, so some peers won't be able to connect directly.

Link to post
Share on other sites

Actually, IME, the STUN protocol only really helps with old expensive NAT devices which do 'whole port' mapping or 'Full cone' mapping. A current cheap NAT router is likely to be running Linux and it uses the same connection tracking for the NAT as it does for the firewall. This means that if a STUN server opens a hole it only does it for itself not for everyone. But that's okay because this sort of very narrow NAT mapping only has collisions between mapping when all three of "local port", "remote port" and "remote IP" are the same. In that case the only useful thing the server can do (short of full relay) is to provide everyone with everyone else's external IP addresses. Both DHT and the Tracker do this fine (the tracker is faster).

You may, however, have a problem if you have multiple BTSync copies behind one firewall because they will argue over who has the port number, when they're configured to use the same one. It's very unlikely that the port number presented to the tracker or DHT server will be the same as the one presented to the various clients. It's possible, even likely, that different remote clients will see different public port numbers. Unless you, carefully, make sure each BTSync client (behind a shared firewall) is using a different port. (Or get uPNP working, but then you don't need STUN either).

Of course you have the server, you can probably check if it does see many 'full cone' NAT connections (without uPNP) ... do you?

If there's only one BTSync per port behind a firewall (which means the port numbers are preserved) and the public IPs are known the two clients can punch through head to head NATs without any external help.

If course if the NAT is configured to randomise the port numbers nothing will help, except full relaying and I expect only the tracker allows that.

... Does this mean I actually agree with you at the end ? :huh: ... hmm, no, you said "directly". B)

Link to post
Share on other sites

There are few things:

- You don't always know what external port is assigned, so when you report to DHT it will use your internal port;

- DHT is slower than tracker, and we saw some models that drop the mapping

- Tracker does help us to detect NAT type, so in future we could increase % of direct connections;

- DHT traffic is not encrypted, so some companies (ISP) may block it.

So using DHT is close to tracker, but tracker will give you better chances for direct connection.

Link to post
Share on other sites
  • 1 year later...


It depends on what you want to achieve. Tracker is more organized way to find peers you are interested in and is much easier to manage for admins / users who care of their security. DHT improves robustness of finding necessary peers, though results in fact that your PC has to store and share part of DHT table.

Link to post
Share on other sites

You know guys, I don't actually think you answered the question fully.  Please excuse my ignorance, I have absolutely NO IDEA what a 'DHT' network is.    Enabling the option is clear, but how and what that option does is not.  Perhaps one of you could enlighten me (and perhaps millions of others around the world?)  Thanks! 

OK - Wikipedia answered this for me, but I seem to be unable to post the link here.  :rolleyes:

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.