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

Make a WebTorrent <-> BitTorrent proxy/relay #325

Open
ghost opened this issue May 22, 2015 · 13 comments
Open

Make a WebTorrent <-> BitTorrent proxy/relay #325

ghost opened this issue May 22, 2015 · 13 comments

Comments

@ghost
Copy link

@ghost ghost commented May 22, 2015

Hello,

First of all, thanks for this awesome project and idea!

I am interested in using this project for a private torrent tracker in a private (without any internet access) network.

So I am looking for a way to bridge the BitTorrent Clients with the WebTorrent clients but without saving any data on the disk.

Right now webtorrent-hybrid will try to download the whole torrent from the BitTorrent Clients in order to seed it to the WebTorrent Clients (if I have understood this correctly from the documentation).

Since the network I want to implement this is private (meaning it does not have any Internet access - the network it's quite open for anyone to join) and does not have any bandwidth limits, it's preferable to waste bandwidth by 'relaying' the torrent data from the BitTorrent clients to WebTorrent clients, than downloading every torrent available on the network on a few WebTorrent Clients just to be able to seed them to the browsers.
Its quite a waste of disk space.

So, I was thinking about a way to proxy or relay the peers between the 2 networks (bittorrent<>webtorrent).
That way I could have for example a small software (the proxy/relay) that a few technical users might want to install and it will bridge the two networks between them. The only resource required would be a lot of bandwidth essentially (which is not a problem on the network I intend to use this).

This way the BitTorrent users/seeders won't have to change or do anything on their part, and the WebTorrent users/leechers will be able to enjoy the torrents directly from their browser.

Is this something you would be interested in implementing?
I don't know how difficult is it, or if it's at all possible to do this but it would be a really nice feature until the major torrent clients decide to add WebTorrent extensions to support talking to WebTorrent clients directly (I long for the day this happens :D )

Though I am not very savvy with Javascript, I am willing to provide any assistance you may need :)

Thanks again for your awesome work!

@feross feross changed the title webtorrent peer proxy/relay Make a WebTorrent <-> BitTorrent proxy/relay May 22, 2015
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented May 22, 2015

An interesting idea. Sounds like it would come in handy for some use cases, as you've described.

@Griss168

This comment has been minimized.

Copy link

@Griss168 Griss168 commented Jun 29, 2015

Hello, I have one question:

The wss://tracker.webtorrent.io tracker is than http bittorent tracker and their output is IP, port, peerid, etc. or is different? If is different, what is output? WebRTC peerid?

Looking for a way how to make "bittorrent webrtc relay" because without it is not possible use browser downloading and streaming at this moment.

Thanks for you answer and sorry for my English.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 1, 2015

@Griss168

The WebSocket tracker doesn't respond with "ip:port" like HTTP and UDP trackers do. It works a little differently. To get WebRTC peers connected, we have to do WebRTC signaling which is a bit more complicated than just sharing an "ip:port" string. If Peer A wants to connect to Peer B, the WebSocket tracker has to pass a message from Peer A to Peer B, then pass another message from Peer B back to Peer A. Then the peers can directly connect.

I suggest inspecting the WebSocket traffic in the "Network > Frames" tab in the Chrome web console to get a better idea of what's going on. Eventually, this will be documented.

@z-op

This comment has been minimized.

Copy link

@z-op z-op commented Aug 24, 2015

May be good idea use webtorrent <-> BitTorrent gate as online cinema CDN. And i think so nice to have setup both seed and leech traffic limits. Maybe can further supplement the file meta-information describing the contents and localisation for the better search, and validate this from bitcoin like algorithm?

@Skeen

This comment has been minimized.

Copy link

@Skeen Skeen commented Aug 25, 2017

Being able to run a proxy node would be very nice w.r.t. bridging the currently somewhat decoupled networks. It would be somewhat keen to acting as a Tor exit node, bridging the Deepweb with the ordinary Internet. I imagine a lot of the same legal issues would arise too, but like with Tor, I'm convince some people would like to facilitate it.

@feross how much work do you estimate would be involved in creating such a bridge / proxy?

@Fenny

This comment has been minimized.

Copy link

@Fenny Fenny commented Jan 24, 2018

@z-op

webtorrent <-> BitTorrent gate as online cinema CDN

This is exactly what I'm trying to do, I have a huge spare of dedicated servers with huge speed.
No idea where to start, I would love to donate some dedicated servers for this idea.

@feross feross added accepted and removed accepted labels May 3, 2018
@SzymonScholz

This comment has been minimized.

Copy link

@SzymonScholz SzymonScholz commented May 7, 2018

This issue is not verry active but verry expected by lot of people. Resolving this would be like "little step for human, but big step for world"

Can we hear:

@feross how much work do you estimate would be involved in creating such a bridge / proxy?

@SilentBot1

This comment has been minimized.

Copy link
Member

@SilentBot1 SilentBot1 commented May 7, 2018

I've created a simple bridge application using webseeds but creating a native webtorrent <-> bittorrent seed seems like a lot more work at the moment due to this active issue with webtorrent-hybrid.

The bridge downloads the torrent file from the bittorrent network using webtorrent and exposes the file('s) as an webseed, accessible via http(s) using the http module, with support for range requests. The adding and downloading of the file from the bittorrent network is done on demand when a client requests it from the webseed. This is similar to just calling torrent.createServer() but also downloads the torrent and works with many torrents at once instead of only one.

This isn't an ideal implementation as a native implementation would be way more ideal but the webseed bridge was quite simple to hack together and get working. If people want I can upload the hacked together webseed solution to a repository if people are interested, though it could do with more work.

Though personally I want to look into the feasibility of creating a real bittorrent <-> webtorrent bridge, hopefully when I get some free time over summer.

@Fenny

This comment has been minimized.

Copy link

@Fenny Fenny commented Oct 24, 2019

It has been some time since we talked about this but https://webtor.io/ seems to pulled it off. It's not open source, but it is indeed possible to relay to the UDP network. Are people still interested in this idea?

@alxhotel

This comment has been minimized.

Copy link
Member

@alxhotel alxhotel commented Oct 25, 2019

@Fenny count me in, if you want some help. Maybe we can talk about it in the webtorrent discord.

@LouisMylle

This comment has been minimized.

Copy link

@LouisMylle LouisMylle commented Nov 26, 2019

Hello! Any update on this?

I am currently hosting multiple servers. If I can be of any help don't hestitate to contact me.

Regards, Djitn

@fijiwebdesign

This comment has been minimized.

Copy link

@fijiwebdesign fijiwebdesign commented Nov 27, 2019

We went the way of exposing a dynamic webseed similar to what is explained by @SilentBot1 at https://seedess.com and it is open source. We've moved away from this so it is unmaintained: https://github.com/Seedess/webseed

It allows you to request a webseed of a torrent dynamically by adding the hash to the URL.

Example: if hosted on http://localhost:8000/

http://localhost:8000/file/{infoHash}/filename.mp4

It also generates .torrent files dynamically which has the full torrent meta data (list of infohashes) so that webseeds can start immediately (magnet needs a peer).

Example:
http://localhost:8000/torrent/{infoHash}.torrent

With these two you can immediately proxy any torrent file from bitTorrent to webtorrent and start the download immediately without peers (via webseed).

I haven't looked at it in a while so it needs some work and documentation.

@LouisMylle

This comment has been minimized.

Copy link

@LouisMylle LouisMylle commented Dec 1, 2019

I’m sorry for the late comment but thank you for your help and your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

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