AjCaptcha.Core 0.1.4

dotnet add package AjCaptcha.Core --version 0.1.4
                    
NuGet\Install-Package AjCaptcha.Core -Version 0.1.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AjCaptcha.Core" Version="0.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AjCaptcha.Core" Version="0.1.4" />
                    
Directory.Packages.props
<PackageReference Include="AjCaptcha.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AjCaptcha.Core --version 0.1.4
                    
#r "nuget: AjCaptcha.Core, 0.1.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AjCaptcha.Core@0.1.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AjCaptcha.Core&version=0.1.4
                    
Install as a Cake Addin
#tool nuget:?package=AjCaptcha.Core&version=0.1.4
                    
Install as a Cake Tool

AJ-Captcha .NET

这是 AJ-Captcha 的 .NET 8 实现,包含:

  • AjCaptcha.Core
  • AjCaptcha.AspNetCore
  • 示例服务 AjCaptcha.Sample
  • NuGet 接入演示 AjCaptcha.NugetWebDemo

兼容接口:

  • /captcha/get
  • /captcha/check
  • /captcha/verify

当前已支持:

  • blockPuzzle
  • clickWord
  • 内存缓存
  • Redis 缓存
  • AES 开关
  • 一次性 token
  • 二次校验

前端示例

仓库已包含与当前 .NET 接口兼容的前端示例,目录在 view

  • view/vue
  • view/vue3
  • view/html
  • view/doc

默认本地联调地址是 http://localhost:8080。启动 AjCaptcha.Sample 后,前端示例通常只需要把后端地址指向这个服务即可。

NuGet 包名

  • AjCaptcha.Core
  • AjCaptcha.AspNetCore

快速接入

在 ASP.NET Core 项目里注册:

builder.Services.AddAjCaptcha(builder.Configuration.GetSection("AjCaptcha"));

最小配置:

{
  "AjCaptcha": {
    "Type": "default",
    "CacheType": "Memory",
    "AesStatus": true,
    "InterferenceOptions": 2
  }
}

运行示例

dotnet run --project samples/AjCaptcha.Sample/AjCaptcha.Sample.csproj

开发环境默认地址:

  • http://localhost:8080
  • https://localhost:7080

本地打包

dotnet pack src/AjCaptcha.Core/AjCaptcha.Core.csproj -c Release -o artifacts
dotnet pack src/AjCaptcha.AspNetCore/AjCaptcha.AspNetCore.csproj -c Release -o artifacts

发布说明

GitHub Packages 的自动发布与手动发布说明已移到单独文档:

  • docs/github-packages.md
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on AjCaptcha.Core:

Package Downloads
AjCaptcha.AspNetCore

ASP.NET Core integration for AJ-Captcha .NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.4 133 4/16/2026