6 ms·
Show HN: Pure JavaScript P2P file sharing in the browser
- jaip 14y agoLooks like the future of file sharing. Just waiting for the day when all the browsers would start supporting it.
- pranny 14y agothis is exciting. Only Chrome24 supports it, but sooner all browsers will.
- fastball 14y agoI'm running Chrome 24.0.1312.56, on Mac OS X 10.8.2, yet I still get the alert about unsupported browsers...
- ShirsenduK 14y agoI also sometimes face the same issue on the same configuration. It seems chrome sessions doesnt always get support for IndexedDB. Try refreshing.
- plusfour 14y agohttp://dropandload.com http://dropandload.com It works on most browsers
- piranna 14y agoIt's based on code from my ShareIt! project (http://github.com/piranna/ShareIt http://github.com/piranna/ShareIt) and both are interoperable thanks to my WebP2P protocol :-)
- ShirsenduK 14y agoAwesome work piranna :D
- nextparadigms 14y agoCan the WebP2P protocol be used for Bittorent, too, like instead of that Torque thing they have?
- ShirsenduK 14y agoThats the plan :D. WebDHT is what we need to actually replace bittorrents.
- mridulk 14y agothat is exciting! :)
- Geee 14y agoSomeone else made a browser-based BitTorrent-client, http://hcliff.github.com/ampere/ http://hcliff.github.com/ampere/ Which, apparently, is based on this code by piranna.
- piranna 14y agoWHAT?!?!?!?!! It's the first news I have about that, I don't know to be happy about it or angry about nobody told me... :-P
- Geee 14y agoI just spotted it on Clojure subreddit few days back: http://www.reddit.com/r/Clojure/comments/16r9ym/my_clojurescript_project_a_browser_based/ http://www.reddit.com/r/Clojure/comments/16r9ym/my_clojuresc...
- kybernetikos 14y agoIs the data encrypted on the wire?
- ShirsenduK 14y agoFiles are transferred as blob. Encryption can be dropped in if required. :)
- chongli 14y agoEncryption ought to be standard. Making it optional means most people won't use it.
- 0x006A 14y agoPer spec DataChannels should use encryption by default, you must still encrypt all WebSocket or other traffic that goes via your server.
- piranna 14y agoYou are true. DataChannels are encripted by spec, and WebSockets are also being cyphered. I've taken security and anonimity as far as I could (I'm not a security nor frontend guy... :-P )
- icebraining 14y agoEncryption without authentication is (mostly) useless, and authentication is application-specific, so mandating encryption would have little effect.
- chongli 14y agoI thought the original post was an application.
- pre 14y agoIsn't the browser supposed to stop pages from making connections to machines other than the server they were downloaded from? Has that requirement been dropped? Or does this do something strange to get around it?
- ShirsenduK 14y agoWelcome to the world of impossibilities with WebRTC. http://en.wikipedia.org/wiki/WebRTC http://en.wikipedia.org/wiki/WebRTC
- pre 14y agoHummm. I've found that same-origin policy annoying on occasion but always assumed it was there for good reason and that it was important my browser couldn't just open sockets to any old machine. Was I wrong? Was that not important? Did I go though all that pain for nothing? Does this WebRTC thing have an on/off switch?
- ShirsenduK 14y agoWebRTC is for Real-time communication between browsers. Same-origin policy applies to communication between browser and the server. http://www.w3.org/TR/webrtc/ http://www.w3.org/TR/webrtc/. There are ways to turn it off on your browser, but why would you? :). The tech is yours to be used.
- anonymouz 14y ago> The tech is yours to be used. Well, the tech is for every website to be used, as a visitor to the site that may or may not benefit me. I think that was the reason for the same-origin policy and is, probably the source of concern of the OP. Personally, I use NoScript and RequestPolicy to deal with it. After all, just because JavaScript exists does not mean I want any random website to execute arbitrary code on my machine (especially not with WebRTC).
- 14y ago
- janerik 14y ago<p>This does not work optimally on this site because the following issues:</p><ul><li><b>It uses HTML tags in javascript alert boxes</b></li></ul> http://tmp.fnordig.de/scr/aacc737f52.png http://tmp.fnordig.de/scr/aacc737f52.png
- deleted 14y ago[deleted]
- ShirsenduK 14y agoThis currently works only on the latest browsers; like Chrome 24 on the desktop. Its still not 100% stable. Stability and support for other platforms will soon arrive through browsers updates and polyfills.
- phalgun_g 14y agoI am using Chrome 24 on the desktop. Not working.
- simfoo 14y agoNot working on Chrome 25 either
- skylamer 14y agoVersion 26.0.1394.0 (178735) and guess what... not working !
- aaaaaaaaaaaaaax 14y agono working with chrome 26 ...
- piranna 14y agoChrome v26 has native DataChannels, but I didn't have time to update my polyfill and also it gave me problem the last time I tried it, so I'm waiting until it gets out of Canary. Yes: I developed DataChannel-polyfill, the first working implementation of the DataChannels specification, too... :-)
- bartl 14y agoI thought Javascript wasn't allowed to touch any files on the local filesystem?
- jaip 14y agoFile API is the answer. http://www.w3.org/TR/FileAPI/ http://www.w3.org/TR/FileAPI/
- ShirsenduK 14y agoThis was made possible through File System API. http://www.html5rocks.com/en/tutorials/file/filesystem/ http://www.html5rocks.com/en/tutorials/file/filesystem/
- joelthelion 14y agoI'd like to see this technology used to build a decentralized, uncensorable alternative to twitter or reddit. That would have a far greater impact than yet another file-sharing system. The architecture would basically be a flooding P2P network with measures against spamming (machine learning?).
- ShirsenduK 14y agoNow thats an idea! The web as it should be - Uncensored!
- loceng 14y agoWouldn't this require each computer on any receiving end to process all of the incoming data in order to determine if it's spam or not?
- joelthelion 14y agoAll of it, no, only the data coming from peers. Peers would only repeat data if they consider it good. Also, you could also select peers for the quality of the content they forward to you.
- icebraining 14y agoThere's the Freenet Messaging System: http://blog.locut.us/2008/05/11/fms-spam-proof-anonymous-message-boards-on-freenet/ http://blog.locut.us/2008/05/11/fms-spam-proof-anonymous-mes...
- roothacker 14y agoGreat Hack Shirsendu. Once again, JavaScript Rocks!!!
- wildmXranat 14y agowow
- davedx 14y agoWhat are the security implications of this?
- synctext 14y agoFalse and misleading title. _serverless_ file sharing says title, yet the technology "requires a HTTP server". "Its completely anonymous as no data is ever stored on the server". Incorrect, only mild protection against sniffing and spoofing is provided. The underlying code documentations speaks of "This makes it perfect for anonymity": https://github.com/ShirsenduK/WhatAreYouDownloading/tree/master/public/javascripts/webp2p https://github.com/ShirsenduK/WhatAreYouDownloading/tree/mas... No PKI is linked or included. Proxy service or Sender/receiver unlinkability is not provided. The used WebRTC technology limits UDP/TCP listen sockets. Browser constraints mean WebRTC offers a severely limited experience. For instance, the state of the art in UDP NAT traversal using the neighbor-invite method (beyond STUN/TURN) is not possible. Rant Disclaimer: As an academic working on a real deployed zero-server P2P technology for 7 years, this sort of claims are a bit upsetting. Zero-server file sharing systems, with a proven effective spam/pollution prevention mechanism have been proven to be extremely difficult to build. (e.g. no-spam version of Kazaa,Gnutella) See, https://torrentfreak.com/tribler-makes-bittorrent-impossible-to-shut-down-120208/ https://torrentfreak.com/tribler-makes-bittorrent-impossible... Tribler research group created an upcoming IETF Internet Standard on sharing/streaming which features integrated NAT/firewall puncturing (IETF PPSP work). Compliant IETF PPSP implementations are capable of doing HD-quality streaming, both on-demand and live streaming: https://datatracker.ietf.org/doc/draft-ietf-ppsp-peer-protocol/ https://datatracker.ietf.org/doc/draft-ietf-ppsp-peer-protoc...
- ShirsenduK 14y agoSorry for the misleading title. By serverless I meant direct browser to browser file transfer with no server in between. Files are transferred directly. We need the HTTP Server to host the static webpage which facilitates the bridge. After all, its a browser based solution you need a page to visit. :). Services file dropbox can be used to host the static files and everyone can setup their own file transfer service. With services like WebDHT coming up each of these shares can communicate. Just read about Tribler, it sounds really interesting. All the best with it. This, Tribler and countless other solutions will make the internet what it was meant to be, a decentralized, fault-tolorent network for information exchange. Thanks!
- 14y ago
- StavrosK 14y agoWhy is everyone thinking about torrenting in browsers? I want a service where I can select a sensitive file, give my associate a link, and have that file transferred between our two computers without ever reaching an intermediate server. Does anyone know of a service like that, easy enough for my father to use?
- ShirsenduK 14y agoThis does exactly this as of now.
- StavrosK 14y agoGreat, I'll give it a go soon. I had a look but it can only share folders, not a single file. Otherwise, a very useful service! EDIT: And it's all static HTML, fantastic! I just hosted it on my server, although there doesn't seem to be much of a reason to do that, since it's all static! Thanks a lot for this.
- piranna 14y agoI worked REALLY HARD to make it all statil HTML and Javascript, and I'm still working hard to remove the handshake servers... Any help here will be greatly welcome :-)
- StavrosK 14y agoHmm, who runs the handshake servers, and how can you remove them? Unfortunately I haven't managed to get the app to run, but it sounds fantastic in theory...
- piranna 14y agoCurrently I'm using PubNub as a "pool of peers", where a new peer connect and send a "presence" message that's listened by the previous peers, that then send a SDP offer to that new guy. Later, it keeps waiting some time sending offers to the new guys, and when it has several connections (from older and newer peers) it disconnect and start to search for new peers only over the WebP2P network. Ideally, I would like to use something more "agnostic" like SIP or XMPP, but didn't be able yet to do it in an anonimous way, since both protocols require to create accounts somewhere that later when you register on a SIP or XMPP server it ask to confirm that you exists, so goodbye anonimity :-(
- StavrosK 14y agoIf you're attributing, please make sure you spell people's names correctly: > by @prianna yet the link goes (correctly) to @piranna. It irks me to see people's names misspelled in attributions.
- ShirsenduK 14y agoFixed it.
- plusfour 14y agoThis is a lot better, and works on most browsers: http://dropandload.com http://dropandload.com
- aoprisan 14y agonot working in latest chrome?