diff --git a/README.md b/README.md index 3296ec5..8cfb752 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,19 @@ # 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: +```javascript +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 @@ -8,6 +23,7 @@ 2. Run `cargo r --bin epoxy-server`, optionally with `-r` flag for release ### Client +Note: Building the client is only supported on linux 1. Make sure you have the `wasm32-unknown-unknown` target installed, `wasm-bindgen` and `wasm-opt` executables installed, and `bash`, `python3` packages (`python3` is used for `http.server` module) -2. Run `bash build.sh` to build without wasm-opt and start a webserver +2. Run `pnpm build` diff --git a/package.json b/package.json index f9916ae..3d6c731 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mercuryworkshop/epoxy-tls", - "version": "1.0.1", + "version": "1.0.2", "description": "A wasm library for using raw encrypted tls/ssl/https/websocket streams on the browser", "scripts": { "build": "cd client && ./build.sh" @@ -19,9 +19,5 @@ "browser": "./client/module.js", "module": "./client/module.js", "main": "./client/module.js", - "types": "./client/module.d.ts", - "devDependencies": { - "esbuild": "^0.19.11", - "esbuild-plugin-wasm": "^1.1.0" - } + "types": "./client/module.d.ts" }