{"id":38743381,"url":"https://github.com/shuhanghang/cdn-auto-cert","last_synced_at":"2026-01-17T11:42:20.808Z","repository":{"id":200081457,"uuid":"687874674","full_name":"shuhanghang/cdn-auto-cert","owner":"shuhanghang","description":"CDN HTTPS 证书自动更新，支持阿里云、腾讯云、华为云","archived":false,"fork":false,"pushed_at":"2023-12-22T04:40:34.000Z","size":685,"stargazers_count":25,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-07T05:42:11.548Z","etag":null,"topics":["aliyun","cdn","huaweicloud","layui","lego","letsencrypt","python","tencent-cloud"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuhanghang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-06T07:29:30.000Z","updated_at":"2024-04-11T06:01:40.000Z","dependencies_parsed_at":"2023-10-15T17:10:57.499Z","dependency_job_id":"162a62b1-fa97-4e46-a46e-c2fbd3072094","html_url":"https://github.com/shuhanghang/cdn-auto-cert","commit_stats":null,"previous_names":["shuhanghang/cdn-auto-cert"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shuhanghang/cdn-auto-cert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhanghang%2Fcdn-auto-cert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhanghang%2Fcdn-auto-cert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhanghang%2Fcdn-auto-cert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhanghang%2Fcdn-auto-cert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuhanghang","download_url":"https://codeload.github.com/shuhanghang/cdn-auto-cert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhanghang%2Fcdn-auto-cert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T10:25:30.148Z","status":"ssl_error","status_checked_at":"2026-01-17T10:25:29.718Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aliyun","cdn","huaweicloud","layui","lego","letsencrypt","python","tencent-cloud"],"created_at":"2026-01-17T11:42:20.705Z","updated_at":"2026-01-17T11:42:20.789Z","avatar_url":"https://github.com/shuhanghang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cdn-auto-cert\nCDN HTTPS 证书自动更新，支持阿里云、腾讯云、华为云\n\n## 1. 说明\n1. 读取CDN正在使用的加速域名，获取正在使用（正确配置cname）且开启HTTPS的加速域名\n2. 检测加速站点证书过期时间，满足设定阈值触发重新申请证书或报警（邮件）\n3. 调用lego申请证书、上传更新到对应cdn供应商\n\n## 2. 功能\n+ 支持CDN加速域名证书定时检测、证书申请、证书上传\n+ 支持匹配多级域名、全域名\n+ 支持UI查看域名证书状态、手动（自动）更新证书和状态\n+ 支持指定证书申请机构\n+ 支持证书过期邮件通知\n+ 支持命令行、Docker运行\n\n## 3. 配置\n1. 公共配置文件：[config.py](./configs/config.py)\n2. CDN-DNS配置文件：[providers.yml](./configs/providers.yml)\n3. 供应商秘钥文件：[secret.py](./configs/secret.py)\n\u003e 提示：\n**添加新的CDN加速域名首次需手动开启https并手动上传证书**\n\n## 4. 运行\n### 1. 手动\n``` shell\npip3 install -r requirements.txt -i https://pypi.doubanio.com/simple\npython3 auto_cert.py\n```\n\n### 2. 定时\n```shell\npip3 install -r requirements.txt -i https://pypi.doubanio.com/simple\npython3 auto_cert_scheduler.py\n```\n---\n支持面板，默认账号密码：admin/admin\n```shell\npip3 install -r requirements_ui.txt -i https://pypi.doubanio.com/simple\npython3 app.py\n```\n### 3. docker\n```shell\ndocker build -t cdn-auto-cert:latest -f Dockerfiles/basic/Dockerfile .\ndocker run --name cdn-auto-cert -it \\\n  -v $PWD/configs/config.py:/home/configs/config.py \\\n  -v $PWD/configs/providers.yml:/home/configs/providers.yml \\\n  -v $PWD/configs/secret.py:/home/configs/secret.py \\\n  -d cdn-auto-cert:latest\n```\n---\n支持面板，默认账号密码：admin/admin\n```shell\ndocker build -t cdn-auto-cert-ui:latest -f Dockerfiles/ui/Dockerfile .\ndocker run --name cdn-auto-cert -it \\\n  -p 8080:8080 \\\n  -v $PWD/configs/config.py:/home/configs/config.py \\\n  -v $PWD/configs/providers.yml:/home/configs/providers.yml \\\n  -v $PWD/configs/secret.py:/home/configs/secret.py \\\n  -d cdn-auto-cert-ui:latest\n```\n\n## 5. 截图\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"cdn-auto-cert\" src=\"./docs/images/screenshot.png\"\u003e\n  \u003cp\u003e日志\u003c/p\u003e\n  \u003cimg alt=\"cdn-auto-cert\" src=\"./docs/images/ui.png\"\u003e\n  \u003cp\u003e面板\u003c/p\u003e\n\u003c/div\u003e\n\n## 6. 环境\n+ python3.9.6^\n+ [lego](https://github.com/go-acme/lego)\n+ [layui](https://github.com/layui/layui)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuhanghang%2Fcdn-auto-cert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuhanghang%2Fcdn-auto-cert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuhanghang%2Fcdn-auto-cert/lists"}