{"id":43953341,"url":"https://github.com/tianli0/tencentcdnauthentication","last_synced_at":"2026-02-07T04:05:00.691Z","repository":{"id":196019089,"uuid":"693897392","full_name":"TIANLI0/TencentCDNAuthentication","owner":"TIANLI0","description":"简单的腾讯云鉴权服务","archived":false,"fork":false,"pushed_at":"2023-09-26T07:10:52.000Z","size":47,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-25T12:09:09.844Z","etag":null,"topics":["authentication-backend","cloud","tencent-cloud"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TIANLI0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-19T23:55:11.000Z","updated_at":"2023-11-06T06:21:42.000Z","dependencies_parsed_at":"2023-12-19T10:06:17.055Z","dependency_job_id":null,"html_url":"https://github.com/TIANLI0/TencentCDNAuthentication","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":0.25,"last_synced_commit":"5e5b7ef2723f7c61bcd5b911242f73cc88541c27"},"previous_names":["tianli0/tencentcdnauthentication"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/TIANLI0/TencentCDNAuthentication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIANLI0%2FTencentCDNAuthentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIANLI0%2FTencentCDNAuthentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIANLI0%2FTencentCDNAuthentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIANLI0%2FTencentCDNAuthentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TIANLI0","download_url":"https://codeload.github.com/TIANLI0/TencentCDNAuthentication/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIANLI0%2FTencentCDNAuthentication/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29186068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T03:35:06.566Z","status":"ssl_error","status_checked_at":"2026-02-07T03:34:57.604Z","response_time":63,"last_error":"SSL_read: 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":["authentication-backend","cloud","tencent-cloud"],"created_at":"2026-02-07T04:05:00.079Z","updated_at":"2026-02-07T04:05:00.681Z","avatar_url":"https://github.com/TIANLI0.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TencentCDNAuthentication\n简单的腾讯云鉴权服务，支持QPM IP_QPM 等限制，也可在高响应次数/高流量的场景下自动关闭CDN，适用于腾讯云的远程鉴权服务。\n\n注意：上线生成环境前要测试CDN回源节点连通性！！！由于腾讯云CDN限制，只支持单CDN熔断。\n\n\n![img](https://qcloudimg.tencent-cloud.cn/image/document/d26215edda04745d6fdee7d68ef64cc5.jpg?1)\n\n## How To Use?\n\n1. 从release下载适用于对应版本的二进制可执行文件。\n2. 部署至服务器，根据说明配置.env文件。\n3. 配置blacklist.json文件或者whitelist.json文件（如果未配置其中一个文件，则将判断为运行，比如我没有配置whitelist，那么将所有路径及referer视为白名单，blacklist同理）。具体配置请参考仓库。\n4. 开放相应端口或者启用反向代理，程序将运行在`5276`端口。\n5. CDN启用相关配置（请求方法使用GET，根据需求配置其他选项，为防止程序崩溃或者服务崩溃影响您的业务，建议将超时时长调低）![img](https://qcloudimg.tencent-cloud.cn/image/document/b9a476dda2f433adc8dc49d0d263d4aa.png)\n\nTips: 当然，你可以将超时设置调的尽量低，仅仅将此程序视为面对大量访问情况下的分析工具，触发max_QPM后将会自动关停腾讯云CDN。\n\n\n## .env配置说明\n\n| 配置项      | 示例       | 是否必填 | 说明                                                         |\n| ----------- | :--------- | -------- | :----------------------------------------------------------- |\n| secretID    | 114514     | 否       | 腾讯云secretID，需前往[官网](https://console.cloud.tencent.com/cam/capi)获取，注意KEY安全 |\n| secretKey   | 114514     | 否       | 腾讯云secretKey，需前往[官网](https://console.cloud.tencent.com/cam/capi)获取，注意KEY安全 |\n| cdn_domain  | 114514.com | 否       | 需要自动关闭的CDN站点域名                                    |\n| QPM         | 10000      | 是       | 一分钟内的QPM限制，超过限制将返回403                         |\n| ip_QPM      | 500        | 是       | 单IP一分钟内的QPM限制，超过限制将返回403                     |\n| max_QPM     | 500000     | 是       | 一分钟内的QPM限制，超过限制将关闭CDN，如果未配置secret建议将此项配置尽量高 |\n| max_traffic | 1024       | 否       | 一天内CDN流量限制，单位为MB，注意：由于无法获取CDN实际实时流量，此项为估计值。当触发后将会关停CDN。设置为0或者不填写则不启用统计 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftianli0%2Ftencentcdnauthentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftianli0%2Ftencentcdnauthentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftianli0%2Ftencentcdnauthentication/lists"}