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 upAdd an 'announce' option to announce to custom trackers #427
Conversation
$ webtorrent seed somefile -a http://localhost:8000/announce -a udp://localhost:8000 -q
magnet:?xt=urn:btih:066ed351804835cf0fec21e3b352f58e270a26d5&dn=somefile&tr=http%3A%2F%2Flocalhost%3A8000%2Fannounce&tr=udp%3A%2F%2Flocalhost%3A8000
This comment has been minimized.
This comment has been minimized.
|
Hey, I would really appreciate a review or any opinion before merging! |
This comment has been minimized.
This comment has been minimized.
|
I believed magnet-uri was converting tr attributes (like "tr=http%3A%2F%2Flocalhost%3A8000%2Fannounce&tr=udp%3A%2F%2Flocalhost%3A8000") to announce URL list on its own. Am I wrong or is it a convenience argument to achieve the same goal? |
This comment has been minimized.
This comment has been minimized.
|
@yciabaud I'm not sure to understand, how would you seed a file from the filesystem with custom announce URLs then? |
This comment has been minimized.
This comment has been minimized.
|
Oh I may have misunderstood your example. I believed the magnet uri was an argument. I understand now the purpose of this evolution and I think it is very useful to anyone running a custom tracker. The PR looks good to me. |
This comment has been minimized.
This comment has been minimized.
|
I updated the PR comment to make it more clear, indeed the magnet URI wasn't part of the command. That's effectively while running a custom tracker I encountered this issue and made the PR, I had to use the JS API to announce on my tracker otherwise. Thanks for reviewing @yciabaud. Anything needed before mergin the PR? Like docs somewhere maybe, but I don't see other options documented in the readme except for media output options? cc @feross |
This comment has been minimized.
This comment has been minimized.
|
Out of curiosity, will this overwrite the existing trackers listed in the torrent file / magnet URI? This may be undesirable if you simple wish to add a tracker on top of the existing ones. |
This comment has been minimized.
This comment has been minimized.
|
@gillesdemey Hmm, I didn't consider this before, the idea was just to allow to configure the I didn't tried but according to the documentation, it is "added to list in .torrent or magnet uri". |
This comment has been minimized.
This comment has been minimized.
|
It does overwrite the default trackers. But that's the way create-torrent works atm. If you specify any tracker, at least one, the default are overwritten. https://github.com/feross/create-torrent/blob/master/index.js#L279-L281 We should allow two ways. "announce" and "announceList", as they are already used somehow but both replace. If you use announceList, it overwrites. If you use "announce" it concats them. What do you think? |
This comment has been minimized.
This comment has been minimized.
|
@DiegoRBaquero, I agree it would be nice to have a way to add trackers to the default list instead of overwriting, but in this PR I just want the CLI options to reflect the JS API (so overwriting defaults in any case). If |
This comment has been minimized.
This comment has been minimized.
|
Thanks everyone for the thoughtful discussion. Sorry for taking so long to review this PR. I've been traveling. The CLI change looks good to me, but we should be consistent and pass the (FWIW, any collaborator should feel free to merge a PR once there's sufficient support from other collaborators and it's been at least 3 days so everyone has a chance to weigh in with their thoughts. Power to the people |
Add an 'announce' option to announce to custom trackers
This comment has been minimized.
This comment has been minimized.
|
Released as 0.64.0. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
May 5, 2018
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
valeriangalliat commentedSep 10, 2015
Output: