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

Webtorrent without tracker. #438

Closed
bachlx-bitmark opened this issue Sep 20, 2015 · 3 comments
Closed

Webtorrent without tracker. #438

bachlx-bitmark opened this issue Sep 20, 2015 · 3 comments
Labels

Comments

@bachlx-bitmark
Copy link

@bachlx-bitmark bachlx-bitmark commented Sep 20, 2015

Hi Feross.

I'm using webtorrent, but I don't use bitorrent-tracker, to add a peer to download I use torrent.addPeer(addr). But, I really run on LAN network with "addr" is IP and port of computers.
When two computers in the different LAN network, I don't know what is "addr".
Because a computer has public IP address and private IP address.

Please help me.
Thanks!

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Sep 21, 2015

You can usually just use the built-in list of torrents in a .torrent file or magnet link. If your use case is your own private torrents, then you should consider running your own bitorrent-tracker instance to make peer discovery automatic and easy.

That said, if you want to use torrent.addPeer(addr), you need to know an IP address that will let you reach another peer. Usually it's safest to just use the public IP address. But you can try passing in the private IP address as well, especially if you know the peers are on the same network.

Don't worry if the host at the IP address might not be reachable – the torrent client is smart enough to try and give up after a number of consecutive connect failures. Just add both the public and private IPs.

You can get the port that the torrent client is listening on by calling client.address().port.

@feross feross closed this Sep 21, 2015
@feross feross added the question label Sep 21, 2015
@bachlx-bitmark

This comment has been minimized.

Copy link
Author

@bachlx-bitmark bachlx-bitmark commented Sep 21, 2015

Thanks, I will try.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Sep 21, 2015

Great - feel free to ask additional questions if you run into trouble.

@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
2 participants
You can’t perform that action at this time.