Update READMEs for distributor and wasm crates
This commit is contained in:
parent
e356034dae
commit
37b3aea81a
|
@ -38,7 +38,7 @@ The rdsys request `rtype` has the following fields:
|
||||||
"name": "lox",
|
"name": "lox",
|
||||||
"token": "LoxApiTokenPlaceholder",
|
"token": "LoxApiTokenPlaceholder",
|
||||||
"types": [
|
"types": [
|
||||||
"obfs2",
|
"obfs4",
|
||||||
"scramblesuit"
|
"scramblesuit"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -73,28 +73,36 @@ Rolling back to a previous version of the database is possible by passing the
|
||||||
`roll_back_date` flag at runtime and providing the date/time as a `%Y-%m-%d_%H:%M:%S` string. This argument should be passed if the `LoxContext` should be rolled back to a previous state due to, for example, a mass blocking event that is likely not due to Lox user behaviour. If the exact roll back date/time is not known, the last db entry within 24 hours from the passed `roll_back_date` will be used or else the program will fail gracefully.
|
`roll_back_date` flag at runtime and providing the date/time as a `%Y-%m-%d_%H:%M:%S` string. This argument should be passed if the `LoxContext` should be rolled back to a previous state due to, for example, a mass blocking event that is likely not due to Lox user behaviour. If the exact roll back date/time is not known, the last db entry within 24 hours from the passed `roll_back_date` will be used or else the program will fail gracefully.
|
||||||
|
|
||||||
|
|
||||||
## Test Run
|
## Distributor Staging Environnment
|
||||||
|
|
||||||
For testing purposes, you will need a running instance of [rdsys](https://gitlab.torproject.org/tpo/anti-censorship/rdsys) as well as a running Lox client.
|
The lox distributor is currently deployed for testing on `rdsys-frontend-01`.
|
||||||
|
Client requests can be made to this distributor by following the instructions in the [`lox-wasm` README](../lox-wasm/README.md/#testing)
|
||||||
|
|
||||||
|
## Running the Lox Distributor Locally
|
||||||
|
|
||||||
|
For testing purposes, you will need a locally running instance of [rdsys](https://gitlab.torproject.org/tpo/anti-censorship/rdsys) as well as a running [Lox client](../lox-wasm/).
|
||||||
|
|
||||||
### Run rdsys locally
|
### Run rdsys locally
|
||||||
|
|
||||||
First clone rdsys from [here](https://gitlab.torproject.org/tpo/anti-censorship/rdsys) then change into the backend directory:
|
First clone rdsys from [here](https://gitlab.torproject.org/tpo/anti-censorship/rdsys) then follow the instructions in the [README](https://gitlab.torproject.org/tpo/anti-censorship/rdsys/-/blob/main/README.md) to create a locally running rdsys instance with fake bridge descriptors.
|
||||||
|
|
||||||
```
|
|
||||||
cd rdsys/cmd/backend
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally run rdsys:
|
|
||||||
|
|
||||||
```
|
|
||||||
./backend --config config.json
|
|
||||||
```
|
|
||||||
|
|
||||||
### Run Lox Distributor locally
|
### Run Lox Distributor locally
|
||||||
|
|
||||||
Simply run `cargo run -- config.json` :)
|
The easiest way to test with rdsys is to adjust the [config.json](config.json) so that the `rtype` reads as follows:
|
||||||
|
```
|
||||||
|
"rtype": {
|
||||||
|
"endpoint": "http://127.0.0.1:7100/resources",
|
||||||
|
"name": "https",
|
||||||
|
"token": "HttpsApiTokenPlaceholder",
|
||||||
|
"types": [
|
||||||
|
"obfs4",
|
||||||
|
"snowflake"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then simply run `cargo run -- config.json` :)
|
||||||
|
|
||||||
### Run a Lox client locally
|
### Run a Lox client locally
|
||||||
|
|
||||||
First clone lox-wasm from [here](https://gitlab.torproject.org/tpo/anti-censorship/lox/lox-wasm). Follow the instructions in the [README](https://gitlab.torproject.org/tpo/anti-censorship/lox/lox-wasm/-/blob/main/README.md) to build and test the Lox client.
|
First clone lox-wasm from [here](https://gitlab.torproject.org/tpo/anti-censorship/lox/lox-wasm). Follow the instructions in the [README](../lox-wasm/README.md) to build and test the Lox client.
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"token": "LoxApiTokenPlaceholder",
|
"token": "LoxApiTokenPlaceholder",
|
||||||
"types": [
|
"types": [
|
||||||
"obfs4",
|
"obfs4",
|
||||||
"scramblesuit"
|
"snowflake"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,6 +16,9 @@ wasm-pack build --target web
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
|
||||||
|
|
||||||
|
### Testing Locally
|
||||||
|
|
||||||
The provided `index.html` file can be used for testing the lox bindings. First, follow the instructions to [run a lox server](https://gitlab.torproject.org/cohosh/lox-server).
|
The provided `index.html` file can be used for testing the lox bindings. First, follow the instructions to [run a lox server](https://gitlab.torproject.org/cohosh/lox-server).
|
||||||
|
|
||||||
Then, spin up a simple local webserver in the current directory:
|
Then, spin up a simple local webserver in the current directory:
|
||||||
|
|
Loading…
Reference in New Issue