peopleinside/fla-powcaptcha
最新稳定版本:1.9
Composer 安装命令:
composer require peopleinside/fla-powcaptcha
包简介
Local Proof-of-Work CAPTCHA for Flarum – protect login, registration and password reset without any external service
README 文档
README
A local Proof-of-Work CAPTCHA extension for Flarum that protects login, registration and password-reset forms without relying on any external service (no Cloudflare, no Google reCAPTCHA, no cookies).
How it works
- When an auth modal opens, the browser silently fetches a one-time challenge from the Flarum API.
- The browser solves a SHA-256 hash puzzle (finds a nonce N such that
SHA-256(challenge:N)starts with D hex zeros, where D is the configured difficulty). - The solution token
challenge:nonceis appended to the form submission. - The server verifies the solution and rejects the request if the check fails.
Bots must solve the same puzzle for every request; legitimate users complete it invisibly in the background (< 100 ms at the default difficulty).
Features
- 🔒 No external services – fully self-hosted
- ⚡ Invisible to users – solved automatically while they fill the form
- ⚙️ Configurable difficulty – 5 levels (< 1 ms → ~10 s)
- 🌓 Dark / light mode – widget adapts to Flarum's current theme
- 🌍 Italian & English – auto-detected; add more locales in
locale/ - 🔁 Replay-proof – each challenge is single-use (stored in Flarum's cache)
- ✅ Flarum 1.x and 2.x compatible
Requirements
| Dependency | Version |
|---|---|
| PHP | ≥ 8.1 |
| Flarum | ^1.0 or ^2.0 |
Screenshot
Installation
composer require peopleinside/fla-powcaptcha
Update
composer update peopleinside/fla-powcaptcha
How to remove
composer remove peopleinside/fla-powcaptcha
Then enable the extension in the Flarum admin panel.
Configuration
Go to Admin → Extensions → PoW CAPTCHA and choose:
| Setting | Default | Description |
|---|---|---|
| Enable on Login | ✓ | Protect the login form |
| Enable on Registration | ✓ | Protect the sign-up form |
| Enable on Password Reset | ✓ | Protect the forgot-password form |
| Difficulty | 3 – Standard (~100 ms) | SHA-256 leading-zero count (1–5) |
Development (for contributors only)
The extension is distributed with pre-compiled frontend assets (js/dist/*), so no JS build step is required to install or use it.
Security Notes
- Each challenge is valid for 5 minutes and is single-use (deleted after successful verification).
- The challenge is a 128-bit cryptographically random value; it cannot be guessed or forged.
- The server independently re-computes the SHA-256 hash to verify the solution.
License
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2026-05-14