承接 peopleinside/fla-powcaptcha 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

peopleinside/fla-powcaptcha

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

Packagist License

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

  1. When an auth modal opens, the browser silently fetches a one-time challenge from the Flarum API.
  2. 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).
  3. The solution token challenge:nonce is appended to the form submission.
  4. 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 – 3 levels (~100 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.8 or ^2.0

Screenshot

Screenshot 2026-05-14 205357 1778785001-133386-screenshot-2026-05-14-205627

Disclaimer

This software is provided "AS IS", without any warranty. While it has been tested and reasonable efforts are made to ensure security and reliability, no guarantees are provided. As an open project, anyone may contribute or report issues, but this does not imply endorsement or liability from the maintainers.

You use this software entirely at your own risk. The authors and contributors are not liable for any damages, data loss, or unexpected behavior resulting from its use, modification, or distribution. Always review and test the code independently before deploying it in critical or production environments.

Installation

composer require peopleinside/fla-powcaptcha
For Flarum 1.8 use the version 2.3

The future will be Flarum 2.0 that support the latest release.

Install with

composer require peopleinside/fla-powcaptcha:2.3

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 4 – High (~1 s) SHA-256 leading-zero count (3–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 on Flarum 2.x.

After upgrading from an older release on Flarum 1.8, rebuild the forum bundle so auth modals are extended correctly:

cd vendor/peopleinside/fla-powcaptcha/js
npm install
npm run build
php flarum cache:clear

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.

Running Behind a Reverse Proxy / Load Balancer

Challenges and tokens are bound to the visitor's IP address. If your Flarum instance sits behind a reverse proxy or load balancer that does not populate REMOTE_ADDR with the real client IP, you must set one of the following keys in your config.php so Flarum (and this extension) can resolve the correct IP from forwarded headers:

  • 'proxy_headers' => true (or an explicit list of trusted proxy IPs), or
  • 'proxy_all' => true

If neither is set and the server also can't fall back to REMOTE_ADDR, IP resolution returns empty and this extension will reject all challenge requests with a 429 to fail safe. A warning is logged in that case ([fla-powcaptcha] ...) — check your Flarum log if users report being unable to log in, register, or reset their password.

License

Apache-2.0

peopleinside/fla-powcaptcha 适用场景与选型建议

peopleinside/fla-powcaptcha 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 273 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 05 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「security」 「captcha」 「proof-of-work」 「pow」 「flarum」 「bot-protection」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 peopleinside/fla-powcaptcha 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 peopleinside/fla-powcaptcha 我们能提供哪些服务?
定制开发 / 二次开发

基于 peopleinside/fla-powcaptcha 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 273
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 46
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-05-14