lox-wasm

Crates.iolox-wasm
lib.rslox-wasm
version0.1.0
sourcesrc
created_at2023-11-23 17:47:41.424473
updated_at2023-11-23 17:47:41.424473
descriptionWASM bindings for lox
homepagehttps://gitlab.torproject.org/tpo/anti-censorship/lox/-/wikis/home
repositoryhttps://gitlab.torproject.org/tpo/anti-censorship/lox/-/tree/main/crates/lox-wasm
max_upload_size
id1046413
size30,450
Lindsey Tulloch (onyiny-ang)

documentation

README

lox-wasm

wasm bindings for Lox client requests and response handling. These bindings are compatible with the endpoints in the lox-distributor's request_handler.

Dependencies

cargo install wasm-pack

Build

wasm-pack build --target web

Testing Locally

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.

Note

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.

Commit count: 0

cargo fmt