CFWorkerACME
Cloudflare Worker SSL Certificate Application Agent
Install / Use
/learn @PIKACHUIM/CFWorkerACMEREADME
SSL Helper - SSL Cert Apply Agent on CloudFlare Worker
SSL证书助手 - 基于CF Worker 的SSL证书代理申请平台
项目介绍
SSL证书助手是一个免费、开源的全自动化SSL证书申请和下发平台,依托于Cloudflare运行
本平台通过自动化CNAME和DNS操作,全自动验证域名DNS申请SSL证书,并自动下发到服务器,本项目优势:
- 不依赖服务器即可部署,支持私有化部署,依托于CloudFlare Worker,完全免费
- 支持手动验证和自动化验证(DCV代理),只需设置一次CNAME记录一直可以使用
- 支持
Let's Encrypt、ZeroSSL、Google Trust Service、SSL.com等证书提供商
使用方式
一键部署
| Cloudflare Worker 全球站 | EdgeOsne Functions 国际站 | EdgeOne Functions 中国站 | | :----------------------------------------------------------: |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| :----------------------------------------------------------: | | <img src="https://deploy.workers.cloudflare.com/button" alt="Deploy to Cloudflare Workers" style="width:400px;heigh:200px" /> | <img src="https://cdnstatic.tencentcs.com/edgeone/pages/deploy.svg" alt="使用 EdgeOne Pages 部署" style="width:400px;heigh:200px" /> | <img src="https://cdnstatic.tencentcs.com/edgeone/pages/deploy.svg" alt="使用 EdgeOne Pages 部署" style="width:400px;heigh:200px" /> |
演示地址
- https://newssl.524228.xyz/
克隆代码
git clone https://github.com/PIKACHUIM/CFWorkerACME.git
修改配置
-
复制文件
cp wrangler.example.jsonc wrangler.jsonc
-
修改配置
修改
wrangler.jsonc
{
"vars": {
"MAIL_KEYS": "",
"MAIL_SEND": "noreply@example.com",
"SIGN_AUTH": "",
"DCV_AGENT": "",
"DCV_EMAIL": "account@example.com",
"DCV_TOKEN": "",
"DCV_ZONES": "",
"GTS_useIt": "",
"GTS_keyMC": "",
"GTS_keyID": "",
"GTS_KeyTS": "",
"SSL_useIt": "true",
"SSL_keyMC": "",
"SSL_keyID": "",
"SSL_KeyTS": "",
"ZRO_useIt": "true",
"ZRO_keyMC": "",
"ZRO_keyID": "",
"ZRO_KeyTS": ""
},
"d1_databases": [
{
"binding": "DB_CF",
"database_name": "***********",
"database_id": "***************************"
}
]
}
-
参数说明
| 名称 | 类型 | 说明 | 示例/备注 | | --------- | ------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | MAIL_KEYS | string | Resend密钥:API Keys · Resend | re_wvRR+z5AqmL3rAXp8CQW0BWKX | | MAIL_SEND | string | Resend邮箱:API Keys · Resend | noreply@example.com | | SIGN_AUTH | string | Cookie/用户验证签名加密固定密钥 | PCUG8dc9Yal4ufhe2SRn3NJRJ+flg/B42s1uaUNk8p0a0lG2hw34qP | | DCV_AGENT | string | CloudFlare DCV代理域名-域名根 | dcv.example.com | | DCV_EMAIL | string | CloudFlare DCV代理域名API邮箱 | user@example.com | | DCV_TOKEN | string | CloudFlare DCV代理域名APIKey | NiYqP+IVOlCn63ED1W4JXvH+PyaAUNFyoWJ08F13xbbXvCqUb70,查看https://dash.cloudflare.com/profile/api-tokens | | DCV_ZONES | string | CloudFlare DCV代理域名-区域ID | 10a7bab949e8245578235d18da54f1d3,查看https://dash.cloudflare.com/ | | GTS_useIt | string | Google Trust Service 是否要开启 | true,使用方式查看 https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn | | GTS_keyMC | string | Google Trust Service EAB-MAC | I828b1O/O+S9Z4uE+v32dudUcUTlWc7iDF7rke+6LT6iwa39EihPS61UadY70xKF | | GTS_keyID | string | Google Trust Service EAB账号ID | ede55645ca95b5ce89ceb8a8c047132c | | GTS_KeyTS | string | Google Trust Service ACME密钥 | -----BEGIN PRIVATE KEY----..... | | SSL_useIt | string | SSL.com ACME 服务是否要开启 | true,获取:https://secure.ssl.com/account | | SSL_keyMC | string | SSL.com ACME 服务 EAB-MAC | I828b1O/O+S9Z4uE+v32dudUcUTlWc7iDF7rke+6LT6iwa39EihPS61UadY70xKF | | SSL_keyID | string | SSL.com ACME 服务 EAB账号ID | ede55645ca95b5ce89ceb8a8c047132c | | SSL_KeyTS | string | SSL.com ACME 服务 ACME密钥 | -----BEGIN PRIVATE KEY----..... | | ZRO_useIt | string | ZeroSSL ACME服务 是否要开启 | true,获取:Developer - ZeroSSL | | ZRO_keyMC | string | ZeroSSL ACME服务 EAB-MAC | I828b1O/O+S9Z4uE+v32dudUcUTlWc7iDF7rke+6LT6iwa39EihPS61UadY70xKF | | ZRO_keyID | string | ZeroSSL ACME服务 EAB账号ID | ede55645ca95b5ce89ceb8a8c047132c | | ZRO_KeyTS | string | ZeroSSL ACME服务 ACME密钥 | -----BEGIN PRIVATE KEY----..... |
测试代码
npm install
npm run dev
部署云端
npm run deploy
备注说明
-
Let's Encrypt在CloudFlare Worker上会抛出SSL连接失败问题,导致525错误, 我们设置了一个代理到此供应商https://encrys.524228.xyz/directory, 你可以使用nginx+下列参数代理:location ^~ /directory { proxy_pass https://acme-v02.api.letsencrypt.org/directory; sub_filter acme-v02.api.letsencrypt.org encrys.524228.xyz; sub_filter_types *; sub_filter_once off; proxy_set_header Host acme-v02.api.letsencrypt.org; proxy_set_header Accept-Encoding ""; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_http_version 1.1; proxy_hide_header Upgrade; add_header X-Cache $upstream_cache_status; add_header Cache-Control no-cache; } location /acme/ { proxy_pass https://acme-v02.api.letsencrypt.org/acme/; proxy_set_header Host $Host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_http_version 1.1; proxy_hide_header Upgrade; add_header X-Cache $upstream_cache_status; add_header Cache-Control no-cache; }
常见问题
-
有
acme.sh了,为什么还需要SSL证书助手?1、
acme.sh脚本主要是给单机证书申请使用的,本项目是为了解决多服务器/内网共用SSL证书,可以通过网页或者API同步证书。 2、acme.sh使用TXT验证或者申请通配符证书的时候,而SSL证书助手只需要设置一次CNAME记录即可永久使用。 3、acme.sh并不是人人都熟悉,如果你比较喜欢acme.sh并且没有上述需求,直接使用acme.sh就好了。 -
这个和
宝塔或者1PanelSSL证书申请有什么区别?没什么区别,只是把申请验证过程移到了服务端,方便DCV代理和同步, 实际上这个平台更接近来此加密(https://lcjm.cc/) 的功能和模式
-
这个平台安全可靠吗
演示平台不会主动泄漏您的密钥数据,但无法保证您的证书密钥完全安全。 不过你可以使用自己的Cloudflare账号部署一个私有的实例,完全开源的。
项目赞助
本项目 CDN 加速及安全防护由 Tencent EdgeOne 赞助:EdgeOne 提供长期有效的免费套餐,包含不限量的流量和请求,覆盖中国大陆节点,且无任何超额收费,感兴趣的朋友可以点击下面的链接领取: 亚洲最佳CDN、边缘和安全解决方案 - Tencent EdgeOne
<img src="https://edgeone.ai/media/34fe3a45-492d-4ea4-ae5d-ea1087ca7b4b.png" alt="EdgeOne" style="width:400px" />引用链接
Related Skills
node-connect
354.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
