0K banner

0K

14 devlogs
17h 2m 29s

0K is a proxy - it can connect directly to GitHub, open a downloaded website, or access the rest of the internet via WebRTC - but it doesn’t require any servers.

This project uses AI

GPT helped me understand the shape of Scramjet, and it + a few others assisted with technical logic and test data

Demo Repository

Loading README...

Kendell

Shipped this project!

This is 0K, an extremely versatile proxy that combines technologies (AMP as a proxy, CDNs as hosts, sandboxes as servers) that haven’t been combined before. 0K is built to work anywhere and be used every day, and I hope it shows.

Kendell

One more thing: if you don’t want to set up your own tunnel to test 0K at all, you can now run a temporary tunnel that pipes your traffic through a third party Wisp server at https://0k-web.github.io/relay/

Attachment
0
Kendell

It’s now actually easy to run a tunnel: instead of having to clone 0K and find the relevant code, you can just download a compiled binary, run npx @0k-web/server, or use an online sandbox as a tunnel.

Attachment
0
Kendell

I made a few bug fixes and I rendered an OG image. I’m not actually using OpenGraph, instead uploading it to Flavortown, GitHub, and my project index.

Attachment
0
Kendell

WebRTC time! 0K will now ask you for a tunnel code to access the rest of the internet. When you enter it, 0K makes an offer (it goes to Google AMP to a Cloudflare DO to wherever the tunnel is), listens for an answer, and establishes a connection to the tunnel. Each tunnel code is a single word - good for increasing your vocabulary, and surprisingly unlikely to collide (there’s 370k words).

Attachment
0
Kendell

If you don’t get the point of 0K, I wrote an explainer and added it to the README.

Attachment
0
Kendell

0K now builds to SVG. Yes, SVG. This lets CDNs like jsDelivr and Statically serve it. (Inspired by Night’s DayDreamX)

Attachment
0
Kendell

I took another detour from main development. I had to bring the size of the assets down so 0K can run anywhere HTML runs. I ended up taking advantage of jsDelivr for third party assets and tweaking my zip.js import to skip heavy WASM and content type lookup data. And of course, I added a GitHub Releases workflow so you can actually download 0K.

Attachment
0
Kendell

The promised transport update: local sites now are supported! These let you view a .zip, whether from GitHub or of your own sourcing, as a real webpage, You add local sites (or switch github.io routing between raw.githubusercontent.com, jsdelivr.net, or turned off) via the new settings panel.

Attachment
0
Kendell

I took a detour to work on the home page and README. Back to developing the transport after this.

Attachment
0
Kendell

It’s time to implement the part that makes 0K special: the transport that works without a server. So far, it supports loading GitHub Pages (github.io) via raw.githubusercontent.com, and loading a custom home page.

Attachment
0
Kendell

And I added to the controls: now you can go back/forward/reload. You can’t actually use back/forward on an iframe, and I didn’t want to make a technically incorrect implementation of back/forward, so I’m instead displaying the whole navigation history.

0
Kendell

I added some controls. Styling them to make them feel smooth and unintrusive, and figuring out how to track the current URL, was hard but rewarding.

0
Kendell

I have the core, Scramjet 2, working! Scramjet 2 actually works (although, fun fact, example.com doesn’t due to some SSL technicalities). I had to apply a few patches and write a few custom Vite plugins to handle Scramjet Vite-style (like bundling, inlining, and asset hashing).

Attachment
0
Kendell

Even just initializing the basic empty Vite setup, I had a few false starts. Vite didn’t let me inline styles and scripts so I had to use a plugin. That plugin didn’t inline the favicon but I decided the favicon was unnecessary. And the framework I want to use, Scramjet, didn’t have their version 2 ready (so I’m going to be stuck on version 1).

Attachment
0