mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 14:00:01 -04:00
An encrypted proxy for browser javascript
http://epoxy.r58playz.dev/
client | ||
server | ||
wisp | ||
.envrc | ||
.gitignore | ||
.npmignore | ||
Cargo.lock | ||
Cargo.toml | ||
flake.lock | ||
flake.nix | ||
package.json | ||
README.md |
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.
Simple usage example for making a secure GET request to httpbin.org:
import epoxy from "@mercuryworkshop/epoxy-tls";
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();
Epoxy also allows you to make arbitrary end to end encrypted TCP connections safely directly from the browser.
Building
Server
- Generate certs with
mkcert
and place the public certificate in./server/src/pem.pem
and private certificate in./server/src/key.pem
- Run
cargo r --bin epoxy-server
, optionally with-r
flag for release
Client
Note: Building the client is only supported on linux
- Make sure you have the
wasm32-unknown-unknown
target installed,wasm-bindgen
andwasm-opt
executables installed, andbash
,python3
packages (python3
is used forhttp.server
module) - Run
pnpm build