Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upWebTorrent are trackers needed for others to download from me ? #1526
Comments
This comment has been minimized.
This comment has been minimized.
|
Hey @C0nw0nk, Trackers are needed for initial peer discovery, specifically with WebTorrent in the browser, WebSocket trackers are used. By default any torrent created by a WebTorrent client automatically has 8 trackers added, 3 being WebSocket trackers and 5 being udp, a list of these trackers can be viewed here! Hope this helps! |
This comment has been minimized.
This comment has been minimized.
|
Hello @SilentBot1 Thank you for the information, What about DHT? I thought it had DHT and could work/function without any trackers ? As the github homepage even says DHT support.... |
This comment has been minimized.
This comment has been minimized.
|
DHT is supported, but only on platforms where possible, as a DHT node operates using UDP sockets, which aren't available for JavaScript to access in a browser, it is impossible to implement the Mainline DHT within a browser. Also as the Mainline DHT store peers as their listening TCP addresses (as IPPORT encoded into a 6-byte string), even if browser WebTorrent clients were able to communicate with the Mainline DHT and receive the addresses, communication is impossible as like UDP sockets, TCP sockets aren't accessible to JavaScript in the browser either. When WebTorrent is ran via NodeJS in the command line, the Mainline DHT is supported as both UDP and TCP sockets are accessible. I hope this helps! |
This comment has been minimized.
This comment has been minimized.
|
Is there any plans or development for a DHT websocket version ? cutting out all those issues. A bit like how sessions work i guess. |
This comment has been minimized.
This comment has been minimized.
|
There have been discussions about it, one of which can be seen in this thread, but with how WebRTC connections are established and how a DHT works, it is near if not impossible to implement in the browser. Sorry for the bad news, but I hope this helps none the less. |
This comment has been minimized.
This comment has been minimized.
|
Be interesting to see a more universal solution to this problem. Here is a github repo of trackers i found that i will use ontop of using the default ones. https://github.com/ngosang/trackerslist The more trackers we use the better right...? |
This comment has been minimized.
This comment has been minimized.
|
You said So UDP trackers don't work either only websocket trackers will work ? Because in the default tracker list there are UDP trackers strange enough. https://github.com/webtorrent/create-torrent/blob/6e6fc18aac7d212a5a8d9c766b12a525618e9ceb/index.js#L16 Also looking at the tracker types to add can i add http and https trackers as well as websocket / udp trackers ? https://github.com/ngosang/trackerslist/blob/master/trackers_all_https.txt |
This comment has been minimized.
This comment has been minimized.
|
Hey @C0nw0nk, I haven't tested performance differences in adding more trackers but a wide range of trackers adds more redundancy to the torrent, though you need to be sure that the trackers support WebTorrent if you're only planning on using it in the browser. The reason a range of tracker types are added is because the package that I linked, WebTorrent uses an extension of the HTTP/HTTPS Tracker Protocol to transfer the WebRTC offer and answers, meaning that standard trackers, even if they use http or WebSockets, do not work. The only tracker server that I know of that supports WebTorrent can be found here, and all the public Hope this helps! |
This comment has been minimized.
This comment has been minimized.
|
So why won't webtorrent add support for the other tracker types why do they have to be running a webtorrent tracker for webtorrent to talk to it... Surely to add support for what already exists in the torrent tracking world and is mostly used can't be that hard and the benefits of doing so would be huge. Especially when these trackers use http and https not udp or websockets. javascript can talk to it if the tracker communicates over http or https i am sure ajax or something of this nature can read the responses and talk to it. http and https trackers should be added. |
This comment has been minimized.
This comment has been minimized.
|
The trackers need to support webtorrent because the peers are webrtc offers/answers. There's no way to proxy or use direct udp/tcp/http(s) trackers. |
I am curious with my magnet URI in order for others to download from me do I need a tracker or does webrtc solve all of that and they can download from me with the magnet uri only or the .torrent file directly.
I want to seed to others of my site without trackers etc using only the .torrent fle or magnet uri. But I don't know if it works like that so any random user around the world can download from me ?
This post indicates nobody will be downloading from me.....?
https://stackoverflow.com/questions/34082637/how-to-use-webtorrent-io
WebTorrent doesn't support trackerless magnet URIsCode