An experimental alternative implementation of FriendlyCaptcha/friendly-lite-server in Rust using Actix Web.
https://dosenpfand.github.io/fcaptcha-rs/fcaptcha/ or via cargo doc
.
Set the corresponding environment variables:
FCAPTCHA_BIND_ADDRESS
FCAPTCHA_BIND_PORT
FCAPTCHA_ACCESS_TTL
FCAPTCHA_PUZZLE_TTL
FCAPTCHA_SECRET_KEY
FCAPTCHA_API_KEY
Barebone server hosting puzzle generation and solution verification.
cargo run
or
docker-compose up
and open http://localhost:8080/build-puzzle
Demo with generation, verification and widget.
cargo run --example fcaptcha-demo
or
docker-compose --file example/docker-compose.yml up
and open http://localhost:8080
Demo generating a single puzzle and verifying a single solution.
cargo run --example fcaptcha-single-puzzle
Benchmark puzzle generation and solution verification
cargo bench
or puzzle generation over HTTP (needs the Apache HTTP benchmark tool).
docker-compose up -d && ab -n 1000000 -c 1000 -r http://127.0.0.1:8080/build-puzzle
Requires perf
and cargo-flamegraph
.
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --bench benchmark
Requires cargo-fuzz
.
cargo fuzz run fuzz_target_1
- Resolve all
TODO
s in the code. - Benchmark against reference implementation.
- Deploy to e.g. matheworkout.at