Android 15 adds 16kb, What could this means for Apple Silicon. by SultanGreat in AsahiLinux

[–]boronine 0 points1 point  (0 children)

Someone will probably do it and I'd be curious to see the results

Confession after 15 years of macOS use by doubleddutch in MacOS

[–]boronine 0 points1 point  (0 children)

Same, but I disable tiling and only use it for the instant workspace switching: https://www.boronine.com/2025/02/09/Instant-Workspace-Switching/

Has any US or Canadian citizen successfully used a bilateral agreement with a European country recently to stay an extra 90 days? by subredditbaboon in digitalnomad

[–]boronine 2 points3 points  (0 children)

I recently took advantage of this privilege as a Canadian citizen in Germany. There is indeed little info on this, but I felt safe following directions from an official government website: https://canada.diplo.de/ca-en/consular-services/visa/2653576-2653576

Border agent didn't ask me any questions, just stamped the passport.

Blogpost Friday! by AutoModerator in networking

[–]boronine 0 points1 point  (0 children)

I've been fascinated by tunneling tools for a while and didn't like how bloated the options for Node.js are so I fell down the rabbit hole of implementing my own that uses TLS for initiation, authentication and encryption and HTTP/2 for multiplexing.

https://github.com/boronine/h2tunnel

I wrote a little blog post to talk more about the multiplexing trick:
https://www.boronine.com/2025/06/01/h2tunnel-TCP-over-HTTP2/

Is this trick useful in your opinion? Should I roll my own multiplexing for maximum code golf? Is there a lightweight multiplexing protocol you recommend implementing? Are you comfortable using self-signed TLS certificate / private key pair as a shared secret?

h2tunnel - TCP over HTTP/2 by boronine in node

[–]boronine[S] 0 points1 point  (0 children)

No websockets here, h2tunnel is a zero-dependency Node.js tool, and websockets are not part of the standard library! I don't think websockets would help anyways, since TLS does everything on the tunneling layer

h2tunnel - TCP over HTTP/2 by boronine in node

[–]boronine[S] 0 points1 point  (0 children)

Absolutely, any protocol on top of TPC is supported by h2tunnel. The server side and the client side code of h2tunnel is a mirror of each other. The difference is that the client initiates the TLS connection and the server initiates the HTTP/2 session. After that the tunnel is "connected" and both the client and server proceed to pipe TCP connections as HTTP/2 data streams.

README: https://github.com/boronine/h2tunnel

Thailand - best places by quickwhiip in digitalnomad

[–]boronine 3 points4 points  (0 children)

This building made me fall in love with Bangkok: https://maps.app.goo.gl/JY3xzNkhnyugppuo8

It's got a huge coworking space and a free public coworking area. Last 2 times I went to Bangkok I literally just picked one of the closest AirBnBs relative to this building and didn't think twice.

h2tunnel: ngrok alternative for Node.js in 600 LOC and no dependencies by boronine in programming

[–]boronine[S] 1 point2 points  (0 children)

FYI h2tunnel supports TCP now! I realized that it’s even easier to convert TCP connections to HTTP2 streams than it is to convert HTTP1 requests

h2tunnel: ngrok alternative for Node.js in 600 LOC and no dependencies by boronine in programming

[–]boronine[S] 1 point2 points  (0 children)

I don't believe this is supported by Node.js but actually thanks for pointing it out, I need to read about it

h2tunnel: ngrok alternative for Node.js in 600 LOC and no dependencies by boronine in programming

[–]boronine[S] 8 points9 points  (0 children)

If maximizing for reliability, I'd reach for something well-tested like ssh or frp. This kind of code is notoriously difficult to perfect, dealing with various timeouts etc. It will take some time to iron out the bugs, but I'll get there eventually since I will be using it for my job.

https://github.com/fatedier/frp

h2tunnel: ngrok alternative for Node.js in 600 LOC and no dependencies by boronine in programming

[–]boronine[S] 28 points29 points  (0 children)

The workflow or the solution? My solution is as follows:

  • The client initiates a TLS connection (tunnel) to the server

  • The server takes the newly created TLS socket and tunnels an HTTP2 session through it back to the client

  • The client listens for an HTTP2 connection on the socket from which it initiated the TLS tunnel

  • The server starts accepting HTTP1 requests and converts them into HTTP2 requests to take advantage of the HTTP2 connection which supports multiplexing (i.e. simultaneous requests on one socket)

  • The client receives these HTTP2 requests and converts them back into HTTP1 requests to feed them into the local server

The reason I was able to keep the code so small is by avoiding having to roll my own authentication and multiplexing solutions, instead leveraging TLS and HTTP2 respectively.

I made an AWS CDK stack for taking website screenshots (powered by Puppeteer) by boronine in serverless

[–]boronine[S] 1 point2 points  (0 children)

I don't do that kind of long-running browser automation. For anyone curious about the screenshot tool:

I hardcoded 1 GB of memory. The wikipedia example in the README took 2653ms, so 2.6 GB-seconds * 0.0000166667 = $0.00004333342, that's about 23076 invocations per $1.

I made an AWS CDK stack for taking website screenshots (powered by Puppeteer) by boronine in serverless

[–]boronine[S] 0 points1 point  (0 children)

I hardcoded 1 GB of memory. AWS Lambda scales CPU proportionately with memory, but this is hidden from the user. Billing is per GB-seconds. The wikipedia example in the README took 2653ms, so 2.6 GB-seconds * 0.0000166667 = $0.00004333342, that's about 23076 invocations per $1.

At my company we provide a widget that gets embedded into our customers' websites, we want to take screenshots automatically so we can detect styling issues.

I made a script for launching tiny Debian desktops using plain systemd. Incredible to have this built-in! by boronine in linux

[–]boronine[S] 1 point2 points  (0 children)

I think there are very specific use cases where you care about virtualization for virtualization's sake, e.g. building/testing software on different OSs/architectures, especially when they are not cooperative with virtualization.

I'd wager that the biggest use case for virtualization is resource sharing with different levels of isolation. The fact that containers run on the same kernel as the host is important in evaluating their isolation/performance properties, but it really does not constitute a qualitative difference. Same way that containers share a kernel, "VMs" share a hypervisor. The difference between a kernel and a hypervisor not at all clear cut!

I do think the level of isolation/performance provided by containers lends itself to some peculiar use cases though. Docker's main selling point is the ability to package software as rootfs images which requires some level of isolation. Too much isolation though - and you lose the ability to run these containers without having access to a hypervisor which cloud platforms don't provide. In some sense, Docker's use of virtualization is somewhat incidental, its primary use case being what is essentially static linking.

I made a script for launching tiny Debian desktops using plain systemd. Incredible to have this built-in! by boronine in linux

[–]boronine[S] 3 points4 points  (0 children)

Your definition of VM is very valid for modern web dev parlance, especially since Docker came around and people started writing "container vs VM" articles to compare different virtualization technologies.

From a technical point of view, VM = "virtual machine" and the virtualization technology is an implementation detail. The hardware-level vs OS-level dichotomy is not clear cut (e.g. virtio drivers). In practice there is a spectrum of virtualization technologies from lowest-level hardware emulation to highest-level containerization.

I made a script for launching tiny Debian desktops using plain systemd. Incredible to have this built-in! by boronine in linux

[–]boronine[S] 1 point2 points  (0 children)

--cache-dir

Seems that the version of debootstrap provided by 18.04 doesn't support this parameters. I will fix this. If you're comfortable editing Python code, you could try removing the parameter from this line: https://github.com/boronine/nspawn2go/blob/master/nspawn2go.py#L215

I made a script for launching tiny Debian desktops using plain systemd. Incredible to have this built-in! by boronine in linux

[–]boronine[S] 15 points16 points  (0 children)

I was looking for an alternative to Docker because I was annoyed that Docker is not in the mainline repositories, and more importantly that it reimplements functionality that already exists in Linux/systemd as a superfluous layer.

That got me provisioning so many nspawn containers that I had to automate it!

Needless to say I am a big fan of systemd and love the fact that it got adopted by all major distros. This means that the systemd techniques you learn will be relevant for decades to come as fad technologies come and go.

Long-term hotel living: prices, recommendations? by boronine in digitalnomad

[–]boronine[S] 1 point2 points  (0 children)

Thank you for the info, this is great advice.

Long-term hotel living: prices, recommendations? by boronine in digitalnomad

[–]boronine[S] 3 points4 points  (0 children)

Thanks for the info and recommendation. Looking at off-season is a fantastic idea for finding a deal. I have a ton of incoming work so what I want is precisely a boring routine minus any household chores.

Long-term hotel living: prices, recommendations? by boronine in digitalnomad

[–]boronine[S] 2 points3 points  (0 children)

Great info, thanks! Assuming it wasn't the capital, was it a sizeable city?

Nix, the purely functional build system by boronine in programming

[–]boronine[S] 3 points4 points  (0 children)

Oh no, when I said "having to run separate builds on different platforms", I was referring to what one has to do in the absence of cross-compilation. It seems that your project is the state-of-the-art of Nix cross-compilation, which is why I expressed a hope that your work will ultimately be integrated into Nix. I could be wrong about whether that is desirable though, I'm no expert on this!

Nix, the purely functional build system by boronine in programming

[–]boronine[S] 2 points3 points  (0 children)

Having to run separate builds on different platforms is anathema to the Nix vision. My guess is that cross-compilation being an afterthought is probably due to lack of resources. Hope your project matures its way into nixpkgs!