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

How to use command line seeding and downloading file? #334

Closed
zoudf opened this issue May 30, 2015 · 8 comments
Closed

How to use command line seeding and downloading file? #334

zoudf opened this issue May 30, 2015 · 8 comments

Comments

@zoudf
Copy link

@zoudf zoudf commented May 30, 2015

Thanks for the great project!
My pc : Window8.1 -> created two VirtualBox machines: Ubuntu14.04.2 64 bit
In both Ubuntu installed Webtorrent & webtorrent-hybrid

I'm using command line in one example :A
zdf@zdf-VirtualBox64:~$ webtorrent-hybrid seed aa.txt
seeding: aa.txt
magnet uri: magnet:?xt=urn:btih:c53c2bb5059ad3406100cffdc269dbca7e57db40&dn=aa.txt&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.webtorrent.io%3A80&tr=wss%3A%2F%2Ftracker.webtorrent.io
speed: 0 B/s downloaded: 0 B/16 B uploaded: 0 B peers: 0/0 hotswaps: 0
time remaining: a few seconds remaining total time: 996s queued peers: 0 blocked: 0

In other example:B
zdf@zdf-VirtualBox64:~$ webtorrent-hybrid magnet:?xt=urn:btih:c53c2bb5059ad3406100cffdc269dbca7e57db40
fetching torrent metadata from 0 peers

No mater use webtorrent-hybrid or webtorrent command
"B" always not start download.

Eventually I use another PC open chrome -> instant.io download the hash upper.
It can download at instant.io! and then "B" downloaded from chrome

How to use command line only and transfer each other?

@ericwooley

This comment has been minimized.

Copy link
Contributor

@ericwooley ericwooley commented Jun 10, 2015

Webtorrent-hybrid won't work on windows, and webtorrent as a cli won't connect to web clients. I think that this issue might have something to do with that.

can you post your commands in windows as well?

@zoudf

This comment has been minimized.

Copy link
Author

@zoudf zoudf commented Jun 10, 2015

I don't run command line on windows
Just created 2 VirtualBox machines on my laptop and test command line, laptop is windows.
VirtualBox "A" ubuntu 64bit
VirtualBox "B" ubuntu 64bit

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 10, 2015

@ericwooley The webtorrent-hybrid CLI does connect to web clients, as well as to other webtorrent-hybrid clients, so his test case should work.

@zoudf My guess is that Virtualbox has a firewall that is blocking WebRTC connections. WebRTC usually finds a way to connect as long as one side doesn't have an overly restrictive NAT. In this case, with two VMs trying to connect to each other, I bet it's just failing to do NAT traversal.

Here's something that is more likely to work: Try seeding from one of the VMs and downloading from https://instant.io using your normal web browser outside the VM.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 10, 2015

Another idea: try specifying a TURN relay server. This is a server that will get used to relay traffic between two peers that can't directly connect (like your two VMs).

Just use the rtcConfig parameter to the WebTorrent constructor to specify the server to use. For testing, you can use the config here: https://instant.io/rtcConfig but it's only good for 5 minutes, so this isn't suitable for use in production. Just to get your test working.

You can run your own TURN server or just use Twilio's service (it's super cheap).

@feross feross closed this Jun 10, 2015
@ericwooley

This comment has been minimized.

Copy link
Contributor

@ericwooley ericwooley commented Jun 11, 2015

@feross Sorry if I miscommunicated, but I meant that the webtorrent-hybrid CLI does, and the regular cli does not.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 11, 2015

@ericwooley Gotcha. Thanks for clarifying.

@zoudf

This comment has been minimized.

Copy link
Author

@zoudf zoudf commented Jun 16, 2015

@feross Yes, after changed VirtualBox machine network setting: NAT--> Bridge. It works well.
Thank you!

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 16, 2015

Nice.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 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
3 participants
You can’t perform that action at this time.