Proton Captcha
CapMonster Cloud MCP
还可以使用 CapMonster Cloud MCP 检测并解决 CAPTCHA
Proton Captcha 是 Proton 服务中使用的安全系统,用于验证合法的用户活动并防止自动化操作。解决此验证码类型需要代理。
任务示例
下面展示了 CapMonster Cloud 当前支持的 Proton Captcha 验证类型示例:

Puzzle
请求参数
type<string>requiredCustomTask
class<string>requiredproton
websiteURL<string>required验证码所在主页的地址。
HumanVerificationToken(位于 metadata 中)<string>required来自响应的令牌。
pageAction(位于 metadata 中)<string>required网站上的操作:login 或 signup
userAgent<string>optional浏览器 User-Agent。使用 CapMonster Cloud 支持的当前值:userAgentPlaceholder
您可以在以下地址获取最新值:https://capmonster.cloud/api/useragent/actual。
proxyType<string>requiredhttp - 常规 http/https 代理;
https - 仅当 "http" 不起作用时才尝试此选项(某些自定义代理需要);
socks4 - socks4 代理;
socks5 - socks5 代理。
proxyAddress<string>requiredIPv4/IPv6 代理 IP 地址。不允许:
- 使用透明代理(可以看到客户端 IP);
- 在本地机器上使用代理。
proxyPort<integer>required代理端口。
proxyLogin<string>required代理服务器登录名。
proxyPassword<string>required代理服务器密码。
创建任务方法
POST
https://api.capmonster.cloud/createTask
请求示例
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "proton",
"websiteURL": "https://yourwebsite.com/",
"userAgent": "userAgentPlaceholder",
"metadata": {
"HumanVerificationToken": "your-verification-token",
"pageAction": "login"
},
"proxyType": "http",
"proxyAddress": "8.8.8.8",
"proxyPort": 8080,
"proxyLogin": "proxyLoginHere",
"proxyPassword": "proxyPasswordHere"
}
}
响应示例
{
"errorId": 0,
"taskId": 407533072
}
获取任务结果方法
使用 getTaskResult 方法获取 Proton Captcha 解决方案。
POST
https://api.capmonster.cloud/getTaskResult
请求示例
{
"clientKey":"API_KEY",
"taskId": 407533072
}
响应示例
{
"errorId": 0,
"cost": 0.001,
"status": "ready",
"solution": {
"data": {
"tokens": "TOKEN_VALUE_HERE....."
}
}
}
如何找到 HumanVerificationToken
- 打开带有 Proton Captcha 的页面。
- 打开开发者工具(F12 或右键单击 → 检查)。
- 转到 Network 选项卡并执行触发验证码的操作。
- 查找在响应正文中返回
HumanVerificationToken的请求。 - 复制令牌值并在
metadata.HumanVerificationToken字段中传递。
如何找到 pageAction
pageAction 参数取决于网站上执行的操作:
- 用户登录时使用
login - 创建新账户时使用
signup
使用 SDK 库
- Python
- C#
- Rust
- Go
- PHP
显示代码
# https://github.com/CapMonsterCloud/capmonster-python-captcha-solver
import asyncio
from capmonstercloudclient import CapMonsterClient, ClientOptions
from capmonstercloudclient.requests import ProtonCustomTaskRequest
from capmonstercloudclient.requests.proxy_info import ProxyInfo
API_KEY = "YOUR_API_KEY" # 请指定您的 CapMonster Cloud API 密钥
async def solve_proton():
client = CapMonsterClient(
options=ClientOptions(api_key=API_KEY)
)
# Proton Captcha 只能使用您自己的代理进行解决
proxy = ProxyInfo(
proxyType="http",
proxyAddress="123.45.67.89",
proxyPort=8080,
proxyLogin="username",
proxyPassword="password",
)
proton_request = ProtonCustomTaskRequest(
websiteUrl="https://yourwebsite.com/page-with-proton",
metadata={
"HumanVerificationToken": "your-verification-token",
"pageAction": "login",
},
userAgent="userAgentPlaceholder",
proxy=proxy,
)
# 如有需要,可以检查余额
balance = await client.get_balance()
print("Balance:", balance)
result = await client.solve_captcha(proton_request)
print("Solution:", result)
asyncio.run(solve_proton())
显示代码
// https://github.com/CapMonsterCloud/capmonster-dotnet-captcha-solver
using System;
using System.Threading.Tasks;
using Zennolab.CapMonsterCloud;
using Zennolab.CapMonsterCloud.Requests;
class Program
{
static async Task Main(string[] args)
{
// 请指定您的 CapMonster Cloud API 密钥
var clientOptions = new ClientOptions
{
ClientKey = "YOUR_API_KEY"
};
var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions);
// Proton Captcha 只能使用您自己的代理进行解决
var protonRequest = new ProtonCustomTaskRequest(
humanVerificationToken: "your-verification-token",
pageAction: "login")
{
WebsiteUrl = "https://yourwebsite.com/page-with-proton",
UserAgent = "userAgentPlaceholder",
Proxy = new ProxyContainer(
"123.45.67.89",
8080,
ProxyType.Http,
"username",
"password"
)
};
// 如有需要,可以检查余额
var balance = await cmCloudClient.GetBalanceAsync();
Console.WriteLine("Balance: " + balance);
var protonResult = await cmCloudClient.SolveAsync(protonRequest);
Console.WriteLine("Solution: " + string.Join(", ", protonResult.Solution.Data));
}
}
显示代码
Rust 请使用官方 SDK:crates.io 和 Github。
// https://github.com/CapMonsterCloud/capmonster-rust-captcha-solver
use capmonstercloud_client::requests::{ProtonRequest};
use capmonstercloud_client::{CapMonsterClient, ClientOptions, ProxyInfo, ProxyType};
#[tokio::main]
async fn main() -> capmonstercloud_client::Result<()> {
// 请填写您的 CapMonster Cloud API 密钥
let client = CapMonsterClient::new(ClientOptions::new("YOUR_API_KEY"))?;
// Proton Captcha 必须使用代理
let proxy = ProxyInfo::new(ProxyType::Http, "123.45.67.89", 8080)
.with_auth("username", "password");
let request = ProtonRequest::new(
"https://yourwebsite.com/page-with-proton",
"your-verification-token",
"login",
proxy,
)
.with_user_agent("userAgentPlaceholder");
let solution = client.solve_captcha(&request).await?;
println!("Solution: {solution}");
Ok(())
}
显示代码
Go 请使用官方 SDK:Github。
// https://github.com/CapMonsterCloud/capmonster-go-captcha-solver
package main
import (
"context"
"fmt"
"log"
capmonster "github.com/CapMonsterCloud/capmonster-go-captcha-solver/v2"
)
func main() {
ctx := context.Background()
// 请填写您的 CapMonster Cloud API 密钥
client := capmonster.New("YOUR_API_KEY")
// Proton Captcha 只能使用您自己的代理进行解决
proxy := &capmonster.Proxy{
Type: capmonster.ProxyHTTP,
Address: "123.45.67.89",
Port: 8080,
Login: "username",
Password: "password",
}
request := capmonster.ProtonRequest{
WebsiteURL: "https://yourwebsite.com/page-with-proton",
Metadata: capmonster.ProtonMetadata{HumanVerificationToken: "your-verification-token", PageAction: capmonster.ProtonPageActionLogin},
UserAgent: "userAgentPlaceholder",
Proxy: proxy,
}
// 如有需要,可以检查余额
balance, err := client.GetBalance(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Balance: %.4f USD\n", balance)
solution, err := client.Solve(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println("Solution:", string(solution))
}
显示代码
PHP 请使用官方 SDK:Github。需要 PHP 8.1+,并启用 curl 和 json 扩展。使用 Composer 安装:composer require capmonstercloud/capmonster-client。
<?php
// https://github.com/CapMonsterCloud/capmonster-php-captcha-solver
require 'vendor/autoload.php';
use CapMonsterCloud\CapMonsterClient;
use CapMonsterCloud\ClientOptions;
use CapMonsterCloud\ProxyInfo;
use CapMonsterCloud\ProxyType;
use CapMonsterCloud\Requests\ProtonCustomTaskRequest;
// 请指定您的 CapMonster Cloud API 密钥
$client = new CapMonsterClient(new ClientOptions('YOUR_API_KEY'));
// Proton Captcha 只能使用您自己的代理进行解决
$proxy = new ProxyInfo(ProxyType::Http, '123.45.67.89', 8080, 'username', 'password');
$request = new ProtonCustomTaskRequest(
'https://yourwebsite.com/page-with-proton',
humanVerificationToken: 'your-verification-token',
pageAction: ProtonCustomTaskRequest::ACTION_LOGIN,
proxy: $proxy,
userAgent: 'userAgentPlaceholder',
);
$solution = $client->solve($request);
print_r($solution);
