Crates.io | lox-wasm |
lib.rs | lox-wasm |
version | 0.1.0 |
source | src |
created_at | 2023-11-23 17:47:41.424473 |
updated_at | 2023-11-23 17:47:41.424473 |
description | WASM bindings for lox |
homepage | https://gitlab.torproject.org/tpo/anti-censorship/lox/-/wikis/home |
repository | https://gitlab.torproject.org/tpo/anti-censorship/lox/-/tree/main/crates/lox-wasm |
max_upload_size | |
id | 1046413 |
size | 30,450 |
wasm bindings for Lox client requests and response handling. These bindings are compatible with the endpoints in the lox-distributor
's request_handler
.
cargo install wasm-pack
wasm-pack build --target web
The provided index.html
file can be used for testing the lox bindings. First, follow the instructions to run the lox-distributor.
Then, spin up a simple local webserver in the current directory:
python3 -m http.server 8000
Next, open the dev console in your browser and navigate to http://localhost:8000
.
Although all Lox protocols are implemented, they will not all work with the existing index.js
and the lox-distributor
's request_handler
. This is because varying time intervals must pass between successful requests for certain Lox credentials. To fully test whether or not the full set of Lox credentials are working as intended (while rejecting patience as an acceptable method), the agreed upon time between the client and server must be artificially accelerated in tandem to the required future date after each relevant request so credentials can be validated. An earlier version of the lox-distributor
: lox-server
includes some server side examples of how to accomplish this on the server side and the lox-wasm
crate can be edited to artificially increase the time as shown here.