Live data from Hacker News

Direct Sockets API in Chrome 131

chromestatus.com

71–80 of 171 posts

Re: Direct Sockets API in Chrome 131

#71
post #9

Earlier quoted context omitted.

I'm hacking on a Tauri web app that needs to bridge to talking UDP protocols literally as we speak. While Tauri seems better than ever for cross platform native apps, it's still a huge step to take to allow my web app access to lower level. Rust toolchain, Tauri plugins, sidecar processes, code gen, JSON RPC, all to let my web app talk to my network. Seems great that Chrome continues to bundle these pieces into the b…

with so many multiplatform gui toolkits today, tauri and electron are really bad choices

The cross platform desktop gui toolkits all have some very big downsides and tend to result in bad looking UIs too.

Re: Direct Sockets API in Chrome 131

#72

Earlier quoted context omitted.

with so many multiplatform gui toolkits today, tauri and electron are really bad choices

What's your recommendation? I've tried so many multiplatform toolkits (including GTK, Qt, wxWidgets, Iced, egui, imgui, and investigated slint and sciter) and nothing has come close to the speed of dev and small final app size of something like Tauri+Svelte.

I've also tried Flutter, React Native, Kotlin multiplatform, Wails.

I'm landing on Svelte and Tauri too.

The other alternative I dabble with is using the Android Studio, XCode to write my own WebView wrappers.

Re: Direct Sockets API in Chrome 131

#73
post #41

Earlier quoted context omitted.

That changed (ahm.. will change) with ipv6. I was surprised to see that I can reach residential ipv6 lan hosts directly from the server. No firewalls, no nat. This remains true even with abusive isps that only give out /64 blocks. That said, I agree that peer to peer will never be seemless thanks mostly to said abusive isps.

IPv6 isn't going to happen. Most people's needs are met by NAT for clients and SNI routing for servers. We ran out of IPv4 addresses years ago. If it was actually a problem it would have happened then. It makes me said for the p2p internet but it's true.

What do you mean not going to happen? It's already happening. It's about 45% of internet packets.

Re: Direct Sockets API in Chrome 131

#74
post #26

I’m excited, and anticipate some interesting innovation once browser applications can “talk UDP”. It’s a long time in the making. Gaming isn’t the end of it — being able to communicate with local network services (hardware) without involving an API intervening is very attractive.

Indeed. I'll finally be able to connect to your router and change your wifi password, all through your browser.

Re: Direct Sockets API in Chrome 131

#75
post #39

Earlier quoted context omitted.

That changed (ahm.. will change) with ipv6. I was surprised to see that I can reach residential ipv6 lan hosts directly from the server. No firewalls, no nat. This remains true even with abusive isps that only give out /64 blocks. That said, I agree that peer to peer will never be seemless thanks mostly to said abusive isps.

I sure hope not, this will bring in a new era for internet worms. If some ISPs are not currently firewalling all incoming IPv6 connections, it's a major security risk. I hope some security researcher raises boise about that soon, and the firewalls will go closed by default.

My home router seems to have a stateful firewall and so does my cellphone in tethering mode - I don't know whether that one's implemented on the phone (under my control) or the network.

Firewalling goes back in the control of the user in most cases - the other day we on IRC told someone how to unblock port 80 on their home router.

Re: Direct Sockets API in Chrome 131

#76

Earlier quoted context omitted.

with so many multiplatform gui toolkits today, tauri and electron are really bad choices

The cross platform desktop gui toolkits all have some very big downsides and tend to result in bad looking UIs too.

I've built my app[1] using Qt (C++ and QML), and I think the UI looks decent. There's still a long way for it to feel truly native, but I've got some cool ideas.

[1] https://get-notes.com/

Re: Direct Sockets API in Chrome 131

#77
post #14

Earlier quoted context omitted.

Longest Yard is my favorite Q3 map, but for some reason I cannot use my mouse (?) in your version of the Quake 3 demo.

Interesting, what browser and OS?

I can't use mouse either, macos/Chrome. Otherwise, cool!

Re: Direct Sockets API in Chrome 131

#78

I think a lot of people don't realize it's possible to use UDP in browsers today with WebRTC DataChannel. I have a demo of multiplayer Quake III using peer-to-peer UDP here: https://thelongestyard.link/ Direct sockets will have their uses for compatibility with existing applications, but it's possible to do almost any kind of networking you want on the web if you control both sides of the connection.

There's also this new WebTransport thingie based on HTTP/3:

https://developer.mozilla.org/en-US/docs/Web/API/WebTranspor...

I haven't tinkered with it yet though.

Re: Direct Sockets API in Chrome 131

#79
post #38

Earlier quoted context omitted.

That doesn't really make it any better, if you ask me. The entire Isolated Web Apps proposal is a massive breakdown of the well-established boundaries provided by browsers. Every user understands two things about the internet: 1) check the URL before entering any sensitive data, and 2) don't run random stuff you download. The latter is heavily enforced by both Chrome and Windows complaining quite a bit if you're tryi…

The last time I used Chrome was about 3 years ago. You have a choice.

Something always breaks my streak, but since last year or so I feel I am down to twice a year or something.

Re: Direct Sockets API in Chrome 131

#80
post #74
post #26

I’m excited, and anticipate some interesting innovation once browser applications can “talk UDP”. It’s a long time in the making. Gaming isn’t the end of it — being able to communicate with local network services (hardware) without involving an API intervening is very attractive.

Indeed. I'll finally be able to connect to your router and change your wifi password, all through your browser.

Shhh, you’re giving my parents unrealistic expectations of how much remote tech support I can do.
Post reply on HN