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 upOption to add trackers to a certain torrent in WebTorrent #323
Comments
This comment has been minimized.
This comment has been minimized.
|
WebTorrent parses the magnet link or torrent file (which both contains the trackers) and adds the trackers to the torrent. See parse-torrent |
This comment has been minimized.
This comment has been minimized.
|
So basically, if I want to add more trackers, I add them as '&tr=http://some.url.com&tr=http://some_other.url.com' to the end of the magnet string? |
This comment has been minimized.
This comment has been minimized.
|
@Qqwy Correct - adding the additional trackers in the magnet uri would work. You can also do: var parseTorrent = require('parse-torrent')
var torrent = parseTorrent('magnet:...')
torrent.announce.push('another tracker')
client.add(torrent, function () { ... }) |
This comment has been minimized.
This comment has been minimized.
|
And, as of v0.43, you can also pass in an var WebTorrent = require('webtorrent')
var client = new WebTorrent()
client.add(torrentId, { announce: [] }, function () { ... })This adds to the tracker list already specified in the |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm testing out WebTorrent, switching over from torrent-stream.
One thing I noticed is that WebTorrent does not seem to have a clear way to add trackers (beside the DHT-network of course) to a certain torrent. Is there a built-in mechanism for this?
If not, I think it would be a very useful feature that might very well speed up many of the torrent requests (at least the ones not needing WebRTC, for now).