cargo run --bin server
it will display the initial secret key.
Given the initial secret key, run this locally:
cargo run --bin client_secret <secret_key>
It will allow 127.0.0.1 to connect again without the secret key. Run this command:
cargo run --bin client
-
through secret key:
ws://<server_ip_address>:8080/secret/<secret_key>
-
if the device's ip address is already in the whitelist:
ws://<server_ip_address>:8080/success/
POST http://localhost:8080/whitelist
Set in the body a json:
{
"ip_address": "<ip_address>"
}
This will respond with a newly generated secret key.
DELETE http://localhost:8080/whitelist
Set in the body a json:
{
"ip_address": "<ip_address>"
}
Returns true
if removed successfully.
Access from another port: GET http://0.0.0.0:8090/whitelist