top | item 8317441

WebTorrent now works in the browser, end-to-end

263 points| MzHN | 11 years ago |twitter.com | reply

83 comments

order
[+] fragmede|11 years ago|reply
"instant.io: drop a file or files on the browser, it generates a torrent, and you become the first seeder just send the info hash to a friend and they'll download the file from you using the bittorrent protocol -- swarming works (so multiple people can download efficiently)"

https://botbot.me/freenode/webtorrent/2014-09-11/

(wasn't obvious to me what this was...)

[+] patrickaljord|11 years ago|reply
This is a very cool project but it is not compatible with current bittorrent clients. It uses webrtc for the transport instead of UDP. In order for it to be compatible with traditional bittorrent clients, those clients would have to implement communication with webtorrent clients, which hopefully shouldn't be too hard, still as of now it won't work with current clients. Still very cool though and I hope traditional clients will implement webtorrent. The other way to make it work would for browsers to implement UDP which some do such as chrome but only as chrome apps.
[+] rakoo|11 years ago|reply
Nitpick: traditional bittorrent sits on top of TCP. utp, the protocol to make torrents run smoother, does run on UDP, but it's not the official way to do it (although most clients should do it)
[+] jacquesm|11 years ago|reply
Could you make a 'bridge' somehow between the two (browser extension?)
[+] ante_annum|11 years ago|reply
Feross actually gave a talk about this where a lot of these questions got answered.
[+] jacquesm|11 years ago|reply
How hard would it be to make a torrent:// protocol extension that allows web like content to be stored in torrents? Obviously that would only work for static content (unless the creation of such torrents could be used to preserve state) but this seems like an interesting development.

Decentralized hosting of content that can easily be browsed seems like a useful thing to have.

[+] sktrdie|11 years ago|reply
In terms of accessing small resources (HTML pages), a client-server setup is by far faster than a P2P system. The Web is client-server specifically for this reason. Not to mention that the whole power of a client-server setup is the ability to have clients alter the state of the server. With a P2P system, propagating changes and making sure each peer has the correct copy, requires more time.

Check out this paper to learn more about the Web applied to P2P networks [1].

Li, Ruixuan, et al. "WebPeer: A P2P-based System for Publishing and Discovering Web Services." http://www-inf.it-sudparis.eu/~tata/papiers/sellami/P2P_Disc...

[+] fineIllregister|11 years ago|reply
A few years back, I saw a proof of concept on PlanetKDE using magnet links in Konqueror to browse. I was unable to find it again.
[+] brador|11 years ago|reply
I'd be concerned of this becoming an additional security risk. You just know someones gonna find a way to inject malware into it. On a home network it's not a big problem, but on a corp it'll be open season.
[+] the8472|11 years ago|reply
While that's a neat tech toy I don't think the browser is a good platform for a torrent client.

A significant drawback is that you'll have to keep a tab open for seeding. And no DHT support either.

BT clients are best operated in a daemon-like fashion with access to system facilities such as inotify, udp and tcp sockets alike and as something that does not compete for CPU time/garbage collection/file descriptors/etc. resources with interactive web browsing.

[+] VikingCoder|11 years ago|reply
Perhaps you're describing a Browser Extension?
[+] rid|11 years ago|reply
Seems similar to PaddleOver [1] which was developed by Bittorrent inc a few years ago using their Btapp.js [2] library, unfortunately the PaddleOver site has expired and the code base hasn't been updated in a year.

It would be interesting to know if the developer looked at btapp.js and if so, why did he decide not to use it? Getting this technology web embeddable will go a long way to start making peer-to-peer a convenient method of downloading content vs directly downloading from a server, there's always going to be further hurdles to overcome with reliability in a case where the swarm lifetime is very short, but seeding with a few servers can help in that situation. If a web app could upload the torrent and data to a server to seed, then replicate it in a few locations it could be a decent DCDN.

[1] http://pwmckenna.com/2012/06/29/making-of-paddle-over.html

[2] http://btappjs.com/

[+] Legogris|11 years ago|reply
Btapp.js is just a JavaScript API that acts like an interface to their closed-source, Windows-and-OSX-only browser plugin Torque: https://github.com/bittorrenttorque/btapp/issues/11

Something that is done purely with cross-browser compatible web technologies is far more interesting and promising.

[+] stevekl|11 years ago|reply
Does it mean we can finally have web-based popcorn time?

This is REVOLUTIONARY

[+] woah|11 years ago|reply
Finally someone who gets it. Ideally, one could run YouTube on a $5 DO droplet.
[+] wtracy|11 years ago|reply
This looks fantastic for an idea I've been kicking around: Using BitTorrent as a way for clients to upload multi-gigabyte files to a website without using FTP.

The idea is to leverage BitTorrent's robustness in the face of random disconnections and reconnections as well as the easy-to-use throttling options that most clients expose.

The server would run a special BitTorrent client that never seeds, to prevent malicious users from using the server as a gateway to redistribute content.

So, rather than the traditional cloud of people seeding and leeching, the only participants would be one client seeding, and the server leeching. Once the transfer completes, the user could disconnect and the torrent would cease to exist.

[+] wmf|11 years ago|reply
Sounds more like rsync over WebRTC.
[+] wmf|11 years ago|reply

[deleted]

[+] diegocr|11 years ago|reply
I can't get it to work, hope this helps:

Firefox 32:

ICE failed, see about:webrtc for more details

Nightly 35a1:

Mandatory/optional in createOffer options is deprecated! Use {} instead (note the case difference)!

setLocalDescription called without success/failure callbacks. This is deprecated, and will be an error in the future.

ICE failed, see about:webrtc for more details

this._pc is null bundle.js:25705

Chrome 37:

Uncaught, unspecified "error" event. bundle.js:9134

[+] u124556|11 years ago|reply
Is the info hash different from a magnet url? can they be translated from one to the other?
[+] finnn|11 years ago|reply
As i understand it, a magnet URL is a way of transferring an infohash as a URL scheme, so that it works with other programs. For example, the following magnet URL:

magnet:?xt=urn:btih:e666231c9a34be278f6cfc390099e4084b30e023&dn=The.Giver+2014+720p+REPACK+HDRip.x264+AC3-JYK&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Fopen.demonii.com%3A1337

contains first the protocol (magnet:) which tells the OS that this is a magnet URL so give it to some app that can handle that. Since it's in URL form it's all broken down into & separated key/value pairs, so next part:

xt=urn:btih:e666231c9a34be278f6cfc390099e4084b30e023

is the infohash (actual infohash is e666231c9a34be278f6cfc390099e4084b30e02, the xt is just the key for that value, urn:btih probably means something, google it).

The other ones are pretty self-explanatory, the name of the torrent (presumably so the client can display something pretty before it has downloaded the metadata) and some trackers

[+] frik|11 years ago|reply
Is the code available on GitHub? I just saw tge demo on my mobile browser.
[+] captainmuon|11 years ago|reply
It's nice to see BitTorrent used for file transfers (user to user). Strange that it is still hard to get files from A to B. You can put them on a webserver if you have one, or use dropbox, but the download can only start when the upload is finished. I usually use scp for this, but it only works when one side is not firewalled, and isn't feasible for non-technical people. This one could be really useful.

It's sad that BitTorrent is otherwise basically dead (as a way to obtain content). Where I live (Germany) you often get immediately subpoenaed (or the German equiv.) if you use it to download something.

[+] aw3c2|11 years ago|reply
> Where I live (Germany) you often get immediately subpoenaed (or the German equiv.) if you use it to download something.

That's absolutely not true. You can use BitTorrent as much as you like, there is absolutely no danger in doing so. If you commit copyright violations however, you might get caught regardless of how you did it.

[+] dewey|11 years ago|reply
> It's sad that BitTorrent is otherwise basically dead (as a way to obtain content). Where I live (Germany) you often get immediately subpoenaed (or the German equiv.) if you use it to download something.

That's just plain wrong. Maybe if you are downloading the latest hollywood flick from TPB you'll get a "Abmahnung" but that's about it. It's nowhere near "dead". If you are not using one of the big public trackers you won't have a problem. There are also free templates to fight these letters.

[+] ccozan|11 years ago|reply
I live in Germany but this is the first time I hear about this.

The only rule might be: do not down load content ( music) from Sony/BMG because they actively monitor the biggest torrent sites/downloads and might get a letter from their lawyer ( which you can ignore basically).

Movies and music from other labels are relatively safe. I don't download anymore since with 7 euro montly ( two beers) I have Google all access, while spotify is free from mobile.

[+] iopq|11 years ago|reply
Wow, I've never heard of this before. I am using torrent as we speak.
[+] dlxfoo|11 years ago|reply
you might be interested in torrent-webstorage services such as put.io then.