Skip to content

Coding4Hours/lithium

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lithium-js

A clean framework for creating web-proxies using Scramjet v2.

Usage

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");

API

  • 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 with go(url), back(), forward(), reload()
  • getProxied(url) — Returns an encoded Scramjet URL string
  • makeURL(input, template?) — Parse/format URL helper
  • Tab — Multi-tab class, new Tab() creates a tab, .go(url) navigates
  • setFrames(el) — Set the container for Tab iframes

Files

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.

About

A simple and easy framework for creating web-proxies with 3 files

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 92.7%
  • HTML 7.3%