News for hackers. Stuff that matters.
Re:Direct Sockets API in Chrome 131 by ignoramous on Saturday November 02, 2024 @01:50AM (#42024302)
> Direct sockets will have their uses for compatibility with existing applications...

In fact runtimes like Node, Deno, Cloudflare Workers, Fastly Compute, Bun et al run JS on servers, and will benefit from standardization of such features.

  [WICG] aims to provide a space for JavaScript runtimes to collaborate on API interoperability. We focus on documenting and improving interoperability of web platform APIs across runtimes (especially non-browser ones).
https://wintercg.org/
Re:Direct Sockets API in Chrome 131 by synctext on Saturday November 02, 2024 @04:05AM (#42024814)
This slowly alters the essence of The Internet, due to the permissionless nature of running any self-organising system like Bittorrent and Bitcoin. This is NOT in Android, just isolated Web Apps at desktops at this stage[0]. The "direct socket access" creep moves forward again. First, IoT without any security standards. Now Web Apps.

With direct socket access to TCP/UDP you can build anything! You loose the constraint of JS servers, costly WebRTC server hosting, and lack of listen sockets feature in WebRTC DataChannel.

<self promotion>NAT puncturing is already solved in our lab, even for mobile 4G/5G. This might bring back the cyberpunk dreams of Peer2Peer... In our lab we bought 40+ SIM cards for the big EU 4G/5G networks and got the carrier-grade NAT puncturing working[1]. Demo blends 4G/5G puncturing, TikTok-style streaming, and Bittorrent content backend. Reading the docs, these "isolated" Web Apps can even do SMTP STARTTLS, IMAP STARTTLS and POP STLS. wow!

[0] https://github.com/WICG/direct-sockets/blob/main/docs/explai... [1] https://repository.tudelft.nl/record/uuid:cf27f6d4-ca0b-4e20...

Re:Direct Sockets API in Chrome 131 by Uptrenda on Saturday November 02, 2024 @10:15AM (#42026519)
Hello, I wanted to say I've been working on a peer-to-peer library and I'm very much interested in your work on symmetric NAT punching (which as far as I know is novel.) Your work is exactly what I was looking for. Good job on the research. It will have far-reaching applications. I'd be interesting in implementing your algorithms depending on the difficulty some time. Are they patented or is this something anyone can use?

Here's a link to an over-view for my system: https://p2pd.readthedocs.io/en/latest/p2p/connect.html

My system can't handle symmetric --- symmetric. But could in theory handle other types of NATs ---- symmetric. Depending on the exact NAT types and delta types.

Re:Direct Sockets API in Chrome 131 by ignoramous on Saturday November 02, 2024 @01:03PM (#42027612)
I read OP's thesis (which focuses on CGNAT), and one of the techniques discussed therein is similar to Tailscale's: https://tailscale.com/blog/how-nat-traversal-works

  ...with the help of the birthday paradox. Rather than open 1 port on the hard side and have the easy side try 65,535 possibilities, let’s open, say, 256 ports on the hard side (by having 256 sockets sending to the easy side's ip:port), and have the easy side probe target ports at random.
Re:Direct Sockets API in Chrome 131 by Uptrenda on Saturday November 02, 2024 @10:59PM (#42030889)
this comment section has been the most useful and interesting thing I've seen for my own work in a very long time. And completely random, too. Really not bad. To me this represents the godly nature of this website. Where you have extremely well informed people posting high quality technical comments that would be hard to find anywhere else on the web. +100 to all contributors.
Re:Direct Sockets API in Chrome 131 by synctext on Sunday November 03, 2024 @07:42AM (#42032726)
indeed, Tailscale was the first to realise this.

We added specific 4G and 5G mobile features. these carrier-grade boxes have often non-random port allocations. "By relying on provider-aware IPv4 range allocations, provider-aware port prediction heuristics, high bandwidth probing, and the birthday paradox we can successfully bypass even symmetric NATs."

Re:Direct Sockets API in Chrome 131 by 3np on Saturday November 02, 2024 @10:27AM (#42026592)
> By leveraging provider-aware (Vodafone,Orange,Telia, etc.) NAT puncturing strategies we create direct UDP-based phone-to-phone connectivity.

> We utilise parallelism by opening at least 500 Internet datagram sockets on two devices. By relying on provider-aware IPv4 range allocations, provider-aware port prediction heuristics, high bandwidth probing, and the birthday paradox we can successfully bypass even symmetric NATs.

U mad. Love it!

Re:Direct Sockets API in Chrome 131 by savolai on Sunday November 03, 2024 @07:03AM (#42032574)
I don’t understand the topic deeply. Is this futureproof, or likely to be shutdown in a cat and mouse game if it gets widespread, like it needs to for a social network?
Re:Direct Sockets API in Chrome 131 by eternityforest on Monday November 04, 2024 @05:40PM (#42046767)
What if someone finds your IP address and sends you a bunch of crap? It would be very easy to use someone's entire monthly data allowance.

Plus, it only works if you can afford and have access to cell service, and in those cases you or have access to normal Internet stuff.

Unless cell towers are able to route between two phones when their fiber backend goes down. That would make this actually pretty useful in emergencies if a rower could work like a ham repeater, assuming it wasn't too clogged with traffic to have a chance.

Re:Direct Sockets API in Chrome 131 by noduerme on Saturday November 02, 2024 @03:59AM (#42024791)
Can you explain further... how does this improve upon websockets and socketIO for node?
Re:Direct Sockets API in Chrome 131 by arlort on Saturday November 02, 2024 @04:52AM (#42025000)
Without a middleman you can only use web socket to connect to an http server.

So, for instance if I want to connect to an mqtt server from a webpage I have to use a server that supports websocket endpoint. With direct sockets I could connect to any server using any protocol