News for hackers. Stuff that matters.
Re:Show HN: Pure JavaScript P2P file sharing in the browser by pre on Saturday January 26, 2013 @06:05AM (#5120051)
Isn'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?

Re:Show HN: Pure JavaScript P2P file sharing in the browser by iSnow on Saturday January 26, 2013 @07:50AM (#5120230)
I strongly suspect they are using something built on WebRTC.
Re:Show HN: Pure JavaScript P2P file sharing in the browser by ShirsenduK on Saturday January 26, 2013 @06:21AM (#5120082)
Welcome to the world of impossibilities with WebRTC. http://en.wikipedia.org/wiki/WebRTC
Re:Show HN: Pure JavaScript P2P file sharing in the browser by pre on Saturday January 26, 2013 @06:41AM (#5120111)
Hummm. 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?

Re:Show HN: Pure JavaScript P2P file sharing in the browser by ShirsenduK on Saturday January 26, 2013 @06:54AM (#5120128)
WebRTC is for Real-time communication between browsers. Same-origin policy applies to communication between browser and the server.

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.

Re:Show HN: Pure JavaScript P2P file sharing in the browser by anonymouz on Saturday January 26, 2013 @07:09AM (#5120161)
> 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).

Re:Show HN: Pure JavaScript P2P file sharing in the browser by ShirsenduK on Saturday January 26, 2013 @07:39AM (#5120218)
The user decides what he intends to share. His files, his webcam, his printers, etc.
Re:Show HN: Pure JavaScript P2P file sharing in the browser by PommeDeTerre on Saturday January 26, 2013 @08:20AM (#5120260)
Experience has shown that many users just grant such access when prompted, without thinking about it.

Prompts like that also do absolutely nothing to stop malicious use, hidden under a facade of legitimacy. For example, somebody could put together a demo purportedly showing "serverless pure JavaScript P2P file sharing in the browser" solely to trick people into using something harmful. (I'm not saying that's necessarily going on here, of course.)