mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
docs
This commit is contained in:
parent
0d6bb2e8ba
commit
48e9836515
2 changed files with 19 additions and 7 deletions
18
README.md
18
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`
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue