mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 05:50:01 -04:00
An encrypted proxy for browser javascript
http://epoxy.r58playz.dev/
client | ||
server | ||
simple-wisp-client | ||
wisp | ||
.envrc | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
clippy.toml | ||
flake.lock | ||
flake.nix | ||
README.md | ||
rustfmt.toml |
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
Here is a simple usage example:
import epoxy from "./epoxy-module-bundled.js";
const { EpoxyClient, EpoxyClientOptions } = await epoxy();
let options = new EpoxyClientOptions();
options.user_agent = navigator.userAgent;
let client = await new EpoxyClient("wss://localhost:4000", options);
let response = await client.fetch("https://httpbin.org/get");
console.log(await response.text());
See client/demo.js
for more examples.
Using the server
See the server readme.
Building
Server
See the server readme.
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
, jq
, and base64
binaries installed.
In the client
directory:
bash build.sh
To host a local server:
python3 -m http.server