readme
This commit is contained in:
parent
1d5a731812
commit
94f224ef0f
6 changed files with 72 additions and 25 deletions
28
Cargo.lock
generated
28
Cargo.lock
generated
|
@ -187,20 +187,6 @@ dependencies = [
|
|||
"byte-tools",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "browser"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"pow_sha256",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-test",
|
||||
"wee_alloc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.6.1"
|
||||
|
@ -678,6 +664,20 @@ dependencies = [
|
|||
"linked-hash-map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mCaptcha-browser"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"pow_sha256",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-test",
|
||||
"wee_alloc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "m_captcha"
|
||||
version = "0.1.0"
|
||||
|
|
46
README.md
46
README.md
|
@ -12,17 +12,47 @@
|
|||
|
||||
</div>
|
||||
|
||||
## Features
|
||||
TODO
|
||||
### STATUS: ACTIVE DEVELOPMENT (fancy word for unusable)
|
||||
|
||||
mCaptcha uses SHA256 based proof-of-work(PoW) to rate limit users.
|
||||
|
||||
**If someone wants to hammer your site, they will have to do more work to
|
||||
send requests than your server will have to do to respond to their
|
||||
request.**
|
||||
|
||||
## Why use mCaptcha?
|
||||
- Free software, privacy focused
|
||||
- Seamless UX - No more annoying captchas!
|
||||
- IP address independent(sort of) - your users are behind a NAT? We got you covered!
|
||||
- Automatic bot throttling
|
||||
- Resistant to replay attacks - bye-bye captcha farms!
|
||||
|
||||
## Demo
|
||||
|
||||
I'll try to write a dedicated demo server but until then you can try
|
||||
[Shuttlecraft/identity](github.com/shuttlecraft/identity)'s sign up page
|
||||
available at https://accounts.shuttlecraft.io/signup. Feel free to
|
||||
provide bogus information while signing up(project under development,
|
||||
database frequently wiped).
|
||||
|
||||
Be sure to open dev tools' network tab to witness the magic!
|
||||
|
||||
## Usage:
|
||||
|
||||
Add this to your `Cargo.toml`:
|
||||
mCaptcha is made up of three components:
|
||||
|
||||
```toml
|
||||
mCaptcha = { version = "0.1", git = "https://github.com/mcaptcha/mCaptcha" }
|
||||
```
|
||||
#### 1. Front-end library
|
||||
We have a WASM library now, Android and iOS libraries soon
|
||||
|
||||
## Examples:
|
||||
#### 2. Back-end library
|
||||
We have Rust library, other languages will have support soon
|
||||
|
||||
TODO
|
||||
#### 3. Rate limiting service
|
||||
Under development.
|
||||
|
||||
A paid, managed service will be made available soon but
|
||||
I([@realaravinth](https://batsense.net)) encourage you guys to
|
||||
self-host. Go decentralisation!
|
||||
|
||||
## Contributing
|
||||
yes please!
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "browser"
|
||||
name = "mCaptcha-browser"
|
||||
version = "0.1.0"
|
||||
authors = ["realaravinth <realaravinth@batsense.net>"]
|
||||
edition = "2018"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<h1>PoW JavaScript library</h1>
|
||||
|
||||
<strong>JavaScript library to generate PoW for Shuttlecraft</strong>
|
||||
<strong>JavaScript library to generate PoW for mCaptcha</strong>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -15,7 +15,10 @@ for more information.
|
|||
```
|
||||
$ /path/to/wasm-opt pkg/pow_bg.wasm -o pkg/pow_bg.wasm -O --enable-mutable-globals
|
||||
```
|
||||
My /path/to/wasm-opt is `~/.cache/.wasm-pack/wasm-opt-4d7a65327e9363b7/wasm-opt`
|
||||
My `/path/to/wasm-opt` is `~/.cache/.wasm-pack/wasm-opt-4d7a65327e9363b7/wasm-opt`
|
||||
|
||||
|
||||
----
|
||||
|
||||
<h2> Default documentation provided by Rust wasm: </h2>
|
||||
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
//! mCaptcha is a proof of work based Denaial-of-Service attack protection system.
|
||||
//! This is is a WASM library that you can embed in your frontend code to protect your
|
||||
//! service.
|
||||
//!
|
||||
//! A commercial managed solution is in the works but I'd much rather prefer
|
||||
//! folks host their own instances as it will make the more decentralized and free.
|
||||
//!
|
||||
//! ## Workflow:
|
||||
//! mCaptcha workflow in the frontend is simple.
|
||||
//! 1. Call service to get a proof of work(PoW) configuration
|
||||
//! 2. Call into mCaptcha to get PoW
|
||||
//! 3. Send PoW to your service
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<p>
|
||||
<strong>mCaptcha - PoW based DoS protection</strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
Loading…
Reference in a new issue