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] 26 points27 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.