An encrypted proxy for browser javascript http://epoxy.r58playz.dev/
Find a file
2024-02-07 16:50:07 -08:00
client better docs 2024-02-07 16:50:07 -08:00
server fix server 2024-02-07 14:59:05 -08:00
simple-wisp-client fix simple wisp client 2024-02-07 16:31:35 -08:00
wisp more improvements and fix wisp impl 2024-02-07 08:38:37 -08:00
.envrc nixification 2024-01-09 19:46:05 -08:00
.gitignore more improvements and fix wisp impl 2024-02-07 08:38:37 -08:00
.npmignore npm packaging 2024-01-15 14:38:46 -05:00
Cargo.lock more improvements and fix wisp impl 2024-02-07 08:38:37 -08:00
Cargo.toml more improvements and fix wisp impl 2024-02-07 08:38:37 -08:00
flake.lock nixification 2024-01-09 19:46:05 -08:00
flake.nix nixification 2024-01-09 19:46:05 -08:00
package.json make wasm smaller and update build/test system 2024-01-31 06:47:00 -08:00
README.md better docs 2024-02-07 16:50:07 -08:00

epoxy

Epoxy is an encrypted proxy for browser javascript. It allows you to make requests that bypass cors without compromising security, by running SSL/TLS inside webassembly.

Using the client

Epoxy must be run from within a web worker and must be served with the security headers needed for SharedArrayBuffer. Here is a simple usage example:

importScripts("epoxy-bundled.js");

const { EpoxyClient } = await epoxy();
let client = await new EpoxyClient("wss://localhost:4000", navigator.userAgent, 10);

let response = await client.fetch("https://httpbin.org/get");
await response.text();

Using the server

$ cargo r -r --bin epoxy-server -- --help
Implementation of the Wisp protocol in Rust, made for epoxy.

Usage: epoxy-server [OPTIONS] --pubkey <PUBKEY> --privkey <PRIVKEY>

Options:
      --prefix <PREFIX>    [default: ]
  -l, --port <PORT>        [default: 4000]
  -p, --pubkey <PUBKEY>    
  -P, --privkey <PRIVKEY>  
  -h, --help               Print help
  -V, --version            Print version

Building

Rust nightly is required.

Server

cargo b -r --bin epoxy-server

The executable will be placed at target/release/epoxy-server.

Client

Important

Building the client is only supported on Linux.

Make sure you have the wasm32-unknown-unknown rust target, the rust-std component, and the wasm-bindgen, wasm-opt, and base64 binaries installed.

In the client directory:

bash build.sh

To host a local server with the required headers:

python3 serve.py