Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not downloading when using private tracker #1054

Closed
zephrax opened this issue Feb 20, 2017 · 3 comments
Closed

Not downloading when using private tracker #1054

zephrax opened this issue Feb 20, 2017 · 3 comments

Comments

@zephrax
Copy link

@zephrax zephrax commented Feb 20, 2017

Hi,

I've started the simple private tracker with torrent-tracker:

╰─○ ./node_modules/bittorrent-tracker/bin/cmd.js HTTP tracker: http://localhost:8000/announce UDP tracker: udp://0.0.0.0:8000 UDP6 tracker: udp://localhost:8000 WebSocket tracker: ws://localhost:8000 Tracker stats: http://localhost:8000/stats

Also started another process to seed the file:

var WebTorrent = require('webtorrent'); var client = new WebTorrent(); var file = '/home/zephrax/Vuze Downloads/Test.mp4'; var options = { announce : [ 'http://localhost:8000/announce', 'udp://127.0.0.1:8000', 'ws://localhost:8000' ] }; client.seed(file, options, function(torrent) { console.log('Client is seeding:', torrent.infoHash) });

And finally, I wrote a little html to be loaded by the browser, with the following code:
`` var client = new WebTorrent();
var magnetURI = 'magnet:?xt=urn:btih:11d68fffe54198b07093e3bac796d4adcf15bfd6&dn=Test.mp4&tr=ws%3A%2F%2Flocalhost%3A8000&tr=http%3A%2F%2Flocalhost%3A8000%2Fannounce&tr=udp%3A%2F%2Flocalhost%3A8000';

          client.on('error', function (err) {
              console.error('ERROR: ' + err.message);
          }); 
          
          client.on('torrent', function (data) {
              console.log(data);
          }); 
          
          client.add(magnetURI, function (torrent) {
            console.log('Client is downloading:', torrent.infoHash);
            
            torrent.files.forEach(function (file) {
              file.appendTo('body');
            })
          });``

I can see the WebSocket comminicating, but it never starts downloading the file:
selection_371
selection_372

Am I doing something wrong? or this could be an issue?

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Feb 20, 2017

Are you using webtorrent-hybrid to seed? Because it won't work with plain webtorrent in nodejs

@zephrax

This comment has been minimized.

Copy link
Author

@zephrax zephrax commented Feb 21, 2017

Nice tip, with webtorrent-hybrid it worked perfectly. Thanks!

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.