Code Monkey home page Code Monkey logo

fcaptcha-rs's Introduction

fcaptcha-rs

Build Status Covde Coverage

An experimental alternative implementation of FriendlyCaptcha/friendly-lite-server in Rust using Actix Web.

Documentation

https://dosenpfand.github.io/fcaptcha-rs/fcaptcha/ or via cargo doc.

Configuration

Set the corresponding environment variables:

FCAPTCHA_BIND_ADDRESS
FCAPTCHA_BIND_PORT
FCAPTCHA_ACCESS_TTL
FCAPTCHA_PUZZLE_TTL
FCAPTCHA_SECRET_KEY
FCAPTCHA_API_KEY

Run

Server

Barebone server hosting puzzle generation and solution verification.

cargo run

or

docker-compose up

and open http://localhost:8080/build-puzzle

Web Demo

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

CLI Demo

Demo generating a single puzzle and verifying a single solution.

cargo run --example fcaptcha-single-puzzle

Benchmark

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

Flamegraph

Requires perf and cargo-flamegraph.

CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --bench benchmark

Fuzz Test

Requires cargo-fuzz.

cargo fuzz run fuzz_target_1

ToDo

  1. Resolve all TODOs in the code.
  2. Benchmark against reference implementation.
  3. Deploy to e.g. matheworkout.at

fcaptcha-rs's People

Contributors

dosenpfand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.