A clean framework for creating web-proxies using Scramjet v2.
See index.html for a complete example.
import { setWisp, setTransport, createFrame } from "./lithium-js/lithium.mjs";
setWisp("wss://anura.pro/");
setTransport("epoxy");
const frame = await createFrame(document.getElementById("frame"));
frame.go("https://google.com");setWisp(url)— Set the Wisp server URL (ws:// or wss://)setTransport(name)— Set transport:"epoxy"or"libcurl"createFrame(element, plugins?)— Create a Frame on an iframe element, returns a Frame withgo(url),back(),forward(),reload()getProxied(url)— Returns an encoded Scramjet URL stringmakeURL(input, template?)— Parse/format URL helperTab— Multi-tab class,new Tab()creates a tab,.go(url)navigatessetFrames(el)— Set the container for Tab iframes
| File | Purpose |
|---|---|
lithium-js/lithium.mjs |
Core framework (ES module) |
lithium-js/ultraworker.js |
Service worker (uses Scramjet v2 controller SW from CDN) |
All Scramjet v2 scripts are loaded from unpkg CDN — no build step needed.