Git Product home page Git Product logo

auto-ssl's Introduction

Auto-SSL


Warning!!!看下面👇!!!

一定要新建个private repo,然后把这里的代码 push 到你自己的 github private repo,不然Cert的私钥就泄露了


Introduction

这是一个使用 GitHub Actions 通过 acme.sh 自动申请 SSL 证书的项目。

Features

  • 自动申请SSL 证书,并通过 git commit 的方式保存证书到 SSL
  • 每天检查SSL 证书是否快过期,如果小于30天,自动续期
  • 每天的检查报告会同步到 CHECK_LIST.md 文件中
  • 证书是泛域名证书
  • 同时申请 ECDSA 和 RSA 证书

How to use

1. 申请域名

确保已经拥有一个域名。如果没有,您可以通过各大域名注册商申请。

2. 域名托管到 Cloudflare

将您的域名托管到 Cloudflare 上。这一步骤确保了您可以通过 Cloudflare 管理您的 DNS 记录。

3. 申请 Cloudflare 的 API Token

访问 Cloudflare 的 API Token 管理页面,申请一个 API Token。

CF_Token 可以在这里申请 https://dash.cloudflare.com/profile/api-tokens, 权限需要Edit zone DNS

image

CF_Account_ID 点开Cloudflare首页,随便点击一个你托管在此的域名,在右侧会显示CF_Account_ID。

image

4. 配置 GitHub 仓库的 Secrets

在您的 GitHub 仓库中,依次访问 Settings -> Security -> Secrets and variables -> Actions,添加以下三个变量:

  • CF_TOKEN:在上一步中获取的 Cloudflare API Token。
  • CF_ACCOUNT_ID:在上一步中获取的 Cloudflare Account ID。
  • EMAIL:申请SSL需要的邮箱地址。
image

5. 设置 GitHub Actions 权限

在 GitHub 仓库中,依次访问 Settings -> Code and automation -> Actions -> General -> Workflow permissions,勾选 Read and write permissions 权限。

image

6. 修改 repo 中的 cloudflare_domains_list.txt

把里面的域名改为你自己的域名,可以填多个域名每行一个

8. 手动触发 GitHub Actions

auto-ssl's People

Contributors

danbao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.