# fusion-captcha **Repository Path**: ymjake/fusion-captcha ## Basic Information - **Project Name**: fusion-captcha - **Description**: Vello和NetVips开发验证码生成器 - **Primary Language**: C# - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-02 - **Last Updated**: 2026-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: Vello, Captcha ## README # FusionCaptcha FusionCaptcha is a .NET captcha toolkit focused on three maintained modules: - `PowCap` (Proof-of-Work challenge) - `SlideCaptcha` (slider puzzle) - `ClickSelectionCaptcha` (ordered click selection) The repository is intentionally scoped to these three modules for lower maintenance cost. ## Packages | Package | Description | | --- | --- | | `YMJake.FusionCaptcha.Abstractions` | Core contracts and shared models | | `YMJake.FusionCaptcha.Core` | Base rendering pipeline and DI extensions | | `YMJake.FusionCaptcha.PowCap` | PoW challenge server and token verification | | `YMJake.FusionCaptcha.SlideCaptcha` | Slider captcha generation and validation | | `YMJake.FusionCaptcha.ClickSelectionCaptcha` | Click-selection captcha generation and validation | ## Rendering Status - `FusionCaptcha.Core` uses `VelloSharp + NetVips` for base text captcha rendering. - `FusionCaptcha.SlideCaptcha` and `FusionCaptcha.ClickSelectionCaptcha` currently still use `SkiaSharp` in production paths. - Full rendering unification is planned and will be done incrementally to avoid regressions in slider/click puzzle behavior. ## Storage Model - The project now uses `IDistributedCache` directly for captcha state. - For single-node/local runs, register `builder.Services.AddDistributedMemoryCache();`. - For multi-node production, register a distributed provider such as Redis (for example `AddStackExchangeRedisCache(...)`). ## Quick Start (Minimal API) See sample: `samples/FusionCaptcha.MinimalApi` ```powershell dotnet run --project samples/FusionCaptcha.MinimalApi ``` Default endpoints: - `GET /slide` - `POST /slide/validate` - `GET /point` - `POST /point/validate` - `GET /captcha` - `POST /captcha/validate` - `POST /cap/validate` - `MapPowCapEndpoints()` mounted routes ## Sample Frontend `samples/captcha.web` now contains only three tabs: - Slider Puzzle - Click Selection - PoW (CAP) Run: ```powershell cd samples/captcha.web npm install npm run dev ``` ## Notes - Core image processing has been migrated away from ImageSharp. - Deprecated/experimental modules have been removed from maintenance scope.