rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.2k stars 415 forks source link

Magnet links fail if they include "tr=wss://.." (as opposed to udp) #679

Open ghost opened 6 years ago

ghost commented 6 years ago

This is an arbitrary link from bitcute.com: magnet:?xt=urn:btih:1cefee0a0182562a0ba8a9e5d16433649c841748&dn=dsmIXa3Kno0.mp4&tr=udp://explodie.org:6969&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.empire-js.us:1337&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://tracker.opentrackr.org:1337&tr=wss://tracker.btorrent.xyz&tr=wss://tracker.fastcast.nz&tr=wss://tracker.openwebtorrent.com&as=https://seed01.bitchute.com/1129/dsmIXa3Kno0.mp4&as=https://seed02.bitchute.com/1129/dsmIXa3Kno0.mp4&as=https://seed03.bitchute.com/1129/dsmIXa3Kno0.mp4&xs=https://www.bitchute.com/torrent/1129/dsmIXa3Kno0.webtorrent Errors appear for all the "tr=wss://" schemes in that URL. Or perhaps they're just warnings, b/c rtorrent seems to retain the session metadata.

This happened on version "0.9.6/0.13.6" on debian stretch.

kannibalox commented 6 years ago

rTorrent doesn't support WebSocket trackers, so that's to be expected.

ghost commented 6 years ago

I have yet to see it download a single block using the UDP trackers that share the same URL. I'm not sure if the mere presence of WSS trackers are breaking the whole download, or if these bitchute.com torrents are just unseeded.

kannibalox commented 6 years ago

Blocks are downloaded from peers, not trackers (unless you mean you're looking at the raw traffic). If you see the udp trackers in the tracker list and the requests to them aren't erroring out, then no downloading means you aren't connecting to any peers, and naturally you wouldn't be able to connect to what isn't there.

ghost commented 6 years ago

Isn't it the tracker that enables me to find the peers? I'm not finding or connecting to any peers, yet bitchute.com shows the number of peers for a particular video, which was a non-zero number in my tests.

When a magnet link contains a dozen different trackers of different varieties, and the WSS ones are broken, is it possible that the peers are all only connecting through the WSS trackers, and that the UDP trackers are unused by those peers?

lanodan commented 6 years ago

Also PeerTube is using WSS in torrent download, I think rTorrent should/could consider supporting WSS trackers.