Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a367585ab4 | ||
|
|
5362371bda | ||
|
|
35e1bfcd7f | ||
|
|
24df7913fe | ||
|
|
22d3aeb7b5 | ||
|
|
cf005711c0 | ||
|
|
0a00d0c52f | ||
|
|
9aa17a0395 | ||
|
|
65ecdf7dc2 | ||
|
|
0dfa5994cc | ||
|
|
5d2844fdb6 |
19
README.md
19
README.md
@@ -75,8 +75,10 @@ make local.run
|
|||||||
| :--------: | :----------: | :----------: | ----------------------------------------------------------------- |
|
| :--------: | :----------: | :----------: | ----------------------------------------------------------------- |
|
||||||
| 阿里云 | √ | √ | 可签发在阿里云注册的域名;可部署到阿里云 OSS、CDN、SLB |
|
| 阿里云 | √ | √ | 可签发在阿里云注册的域名;可部署到阿里云 OSS、CDN、SLB |
|
||||||
| 腾讯云 | √ | √ | 可签发在腾讯云注册的域名;可部署到腾讯云 COS、CDN、ECDN、CLB、TEO |
|
| 腾讯云 | √ | √ | 可签发在腾讯云注册的域名;可部署到腾讯云 COS、CDN、ECDN、CLB、TEO |
|
||||||
|
| 百度智能云 | | √ | 可部署到百度智能云 CDN |
|
||||||
| 华为云 | √ | √ | 可签发在华为云注册的域名;可部署到华为云 CDN、ELB |
|
| 华为云 | √ | √ | 可签发在华为云注册的域名;可部署到华为云 CDN、ELB |
|
||||||
| 七牛云 | | √ | 可部署到七牛云 CDN |
|
| 七牛云 | | √ | 可部署到七牛云 CDN |
|
||||||
|
| 多吉云 | | √ | 可部署到多吉云 CDN |
|
||||||
| AWS | √ | | 可签发在 AWS Route53 托管的域名 |
|
| AWS | √ | | 可签发在 AWS Route53 托管的域名 |
|
||||||
| CloudFlare | √ | | 可签发在 CloudFlare 注册的域名;CloudFlare 服务自带 SSL 证书 |
|
| CloudFlare | √ | | 可签发在 CloudFlare 注册的域名;CloudFlare 服务自带 SSL 证书 |
|
||||||
| GoDaddy | √ | | 可签发在 GoDaddy 注册的域名 |
|
| GoDaddy | √ | | 可签发在 GoDaddy 注册的域名 |
|
||||||
@@ -90,15 +92,13 @@ make local.run
|
|||||||
|
|
||||||
## 四、系统截图
|
## 四、系统截图
|
||||||
|
|
||||||

|
<div align="center">
|
||||||
|
<img src="https://i.imgur.com/SYjjbql.jpeg" title="Login page" width="95%"/>
|
||||||

|
<img src="https://i.imgur.com/WMVbBId.jpeg" title="Dashboard page" width="47%"/>
|
||||||
|
<img src="https://i.imgur.com/8wit3ZA.jpeg" title="Domains page" width="47%"/>
|
||||||

|
<img src="https://i.imgur.com/EWtOoJ0.jpeg" title="Accesses page" width="47%"/>
|
||||||
|
<img src="https://i.imgur.com/aaPtSW7.jpeg" title="History page" width="47%"/>
|
||||||

|
</div>
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 五、概念
|
## 五、概念
|
||||||
|
|
||||||
@@ -188,3 +188,4 @@ Certimate 是一个免费且开源的项目,采用 [MIT 开源协议](LICENSE.
|
|||||||
## 十、Star 趋势图
|
## 十、Star 趋势图
|
||||||
|
|
||||||
[](https://starchart.cc/usual2970/certimate)
|
[](https://starchart.cc/usual2970/certimate)
|
||||||
|
|
||||||
|
|||||||
50
README_EN.md
50
README_EN.md
@@ -70,34 +70,34 @@ password:1234567890
|
|||||||
|
|
||||||
## List of Supported Providers
|
## List of Supported Providers
|
||||||
|
|
||||||
| Provider | Registration | Deployment | Remarks |
|
| Provider | Registration | Deployment | Remarks |
|
||||||
| :-----------: | :----------: | :--------: | --------------------------------------------------------------------------------------------------------------------- |
|
| :-----------: | :----------: | :--------: | ----------------------------------------------------------------------------------------------------------- |
|
||||||
| Alibaba Cloud | √ | √ | Supports domains registered on Alibaba Cloud; supports deployment to Alibaba Cloud OSS, CDN,SLB |
|
| Alibaba Cloud | √ | √ | Supports domains registered on Alibaba Cloud; supports deployment to Alibaba Cloud OSS, CDN,SLB |
|
||||||
| Tencent Cloud | √ | √ | Supports domains registered on Tencent Cloud; supports deployment to Tencent Cloud COS, CDN, ECDN, CLB, TEO |
|
| Tencent Cloud | √ | √ | Supports domains registered on Tencent Cloud; supports deployment to Tencent Cloud COS, CDN, ECDN, CLB, TEO |
|
||||||
| Huawei Cloud | √ | √ | Supports domains registered on Huawei Cloud; supports deployment to Huawei Cloud CDN, ELB |
|
| Baidu Cloud | | √ | Supports deployment to Baidu Cloud CDN |
|
||||||
| Qiniu Cloud | | √ | Supports deployment to Qiniu Cloud CDN |
|
| Huawei Cloud | √ | √ | Supports domains registered on Huawei Cloud; supports deployment to Huawei Cloud CDN, ELB |
|
||||||
| AWS | √ | | Supports domains managed on AWS Route53 |
|
| Qiniu Cloud | | √ | Supports deployment to Qiniu Cloud CDN |
|
||||||
| CloudFlare | √ | | Supports domains registered on CloudFlare; CloudFlare services come with SSL certificates |
|
| Doge Cloud | | √ | Supports deployment to Doge Cloud CDN |
|
||||||
| GoDaddy | √ | | Supports domains registered on GoDaddy |
|
| AWS | √ | | Supports domains managed on AWS Route53 |
|
||||||
| Namesilo | √ | | Supports domains registered on Namesilo |
|
| CloudFlare | √ | | Supports domains registered on CloudFlare; CloudFlare services come with SSL certificates |
|
||||||
| PowerDNS | √ | | Supports domains managed on PowerDNS |
|
| GoDaddy | √ | | Supports domains registered on GoDaddy |
|
||||||
| HTTP Request | √ | | Supports domains which allow managing DNS by HTTP request |
|
| Namesilo | √ | | Supports domains registered on Namesilo |
|
||||||
| Local Deploy | | √ | Supports deployment to local servers |
|
| PowerDNS | √ | | Supports domains managed on PowerDNS |
|
||||||
| SSH | | √ | Supports deployment to SSH servers |
|
| HTTP Request | √ | | Supports domains which allow managing DNS by HTTP request |
|
||||||
| Webhook | | √ | Supports callback to Webhook |
|
| Local Deploy | | √ | Supports deployment to local servers |
|
||||||
| Kubernetes | | √ | Supports deployment to Kubernetes Secret |
|
| SSH | | √ | Supports deployment to SSH servers |
|
||||||
|
| Webhook | | √ | Supports callback to Webhook |
|
||||||
|
| Kubernetes | | √ | Supports deployment to Kubernetes Secret |
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|
<div align="center">
|
||||||
|
<img src="https://i.imgur.com/SYjjbql.jpeg" title="Login page" width="95%"/>
|
||||||

|
<img src="https://i.imgur.com/WMVbBId.jpeg" title="Dashboard page" width="47%"/>
|
||||||
|
<img src="https://i.imgur.com/8wit3ZA.jpeg" title="Domains page" width="47%"/>
|
||||||

|
<img src="https://i.imgur.com/EWtOoJ0.jpeg" title="Accesses page" width="47%"/>
|
||||||
|
<img src="https://i.imgur.com/aaPtSW7.jpeg" title="History page" width="47%"/>
|
||||||

|
</div>
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Concepts
|
## Concepts
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
aliyunAlb "github.com/alibabacloud-go/alb-20200616/v2/client"
|
aliyunAlb "github.com/alibabacloud-go/alb-20200616/v2/client"
|
||||||
aliyunOpen "github.com/alibabacloud-go/darabonba-openapi/v2/client"
|
aliyunOpen "github.com/alibabacloud-go/darabonba-openapi/v2/client"
|
||||||
@@ -39,10 +40,21 @@ func NewAliyunALBDeployer(option *DeployerOption) (Deployer, error) {
|
|||||||
return nil, xerrors.Wrap(err, "failed to create sdk client")
|
return nil, xerrors.Wrap(err, "failed to create sdk client")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aliCasRegion := option.DeployConfig.GetConfigAsString("region")
|
||||||
|
if aliCasRegion != "" {
|
||||||
|
// 阿里云 CAS 服务接入点是独立于 ALB 服务的
|
||||||
|
// 国内版接入点:华东一杭州
|
||||||
|
// 国际版接入点:亚太东南一新加坡
|
||||||
|
if !strings.HasPrefix(aliCasRegion, "cn-") {
|
||||||
|
aliCasRegion = "ap-southeast-1"
|
||||||
|
} else {
|
||||||
|
aliCasRegion = "cn-hangzhou"
|
||||||
|
}
|
||||||
|
}
|
||||||
uploader, err := uploaderAliyunCas.New(&uploaderAliyunCas.AliyunCASUploaderConfig{
|
uploader, err := uploaderAliyunCas.New(&uploaderAliyunCas.AliyunCASUploaderConfig{
|
||||||
AccessKeyId: access.AccessKeyId,
|
AccessKeyId: access.AccessKeyId,
|
||||||
AccessKeySecret: access.AccessKeySecret,
|
AccessKeySecret: access.AccessKeySecret,
|
||||||
Region: option.DeployConfig.GetConfigAsString("region"),
|
Region: aliCasRegion,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Wrap(err, "failed to create ssl uploader")
|
return nil, xerrors.Wrap(err, "failed to create ssl uploader")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
aliyunOpen "github.com/alibabacloud-go/darabonba-openapi/v2/client"
|
aliyunOpen "github.com/alibabacloud-go/darabonba-openapi/v2/client"
|
||||||
aliyunNlb "github.com/alibabacloud-go/nlb-20220430/v2/client"
|
aliyunNlb "github.com/alibabacloud-go/nlb-20220430/v2/client"
|
||||||
@@ -39,10 +40,21 @@ func NewAliyunNLBDeployer(option *DeployerOption) (Deployer, error) {
|
|||||||
return nil, xerrors.Wrap(err, "failed to create sdk client")
|
return nil, xerrors.Wrap(err, "failed to create sdk client")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aliCasRegion := option.DeployConfig.GetConfigAsString("region")
|
||||||
|
if aliCasRegion != "" {
|
||||||
|
// 阿里云 CAS 服务接入点是独立于 NLB 服务的
|
||||||
|
// 国内版接入点:华东一杭州
|
||||||
|
// 国际版接入点:亚太东南一新加坡
|
||||||
|
if !strings.HasPrefix(aliCasRegion, "cn-") {
|
||||||
|
aliCasRegion = "ap-southeast-1"
|
||||||
|
} else {
|
||||||
|
aliCasRegion = "cn-hangzhou"
|
||||||
|
}
|
||||||
|
}
|
||||||
uploader, err := uploaderAliyunCas.New(&uploaderAliyunCas.AliyunCASUploaderConfig{
|
uploader, err := uploaderAliyunCas.New(&uploaderAliyunCas.AliyunCASUploaderConfig{
|
||||||
AccessKeyId: access.AccessKeyId,
|
AccessKeyId: access.AccessKeyId,
|
||||||
AccessKeySecret: access.AccessKeySecret,
|
AccessKeySecret: access.AccessKeySecret,
|
||||||
Region: option.DeployConfig.GetConfigAsString("region"),
|
Region: aliCasRegion,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Wrap(err, "failed to create ssl uploader")
|
return nil, xerrors.Wrap(err, "failed to create ssl uploader")
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
xerrors "github.com/pkg/errors"
|
xerrors "github.com/pkg/errors"
|
||||||
|
|
||||||
@@ -70,7 +71,8 @@ func (d *DogeCloudCDNDeployer) Deploy(ctx context.Context) error {
|
|||||||
|
|
||||||
// 绑定证书
|
// 绑定证书
|
||||||
// REF: https://docs.dogecloud.com/cdn/api-cert-bind
|
// REF: https://docs.dogecloud.com/cdn/api-cert-bind
|
||||||
bindCdnCertResp, err := d.sdkClient.BindCdnCertWithDomain(upres.CertId, d.option.DeployConfig.GetConfigAsString("domain"))
|
bindCdnCertId, _ := strconv.ParseInt(upres.CertId, 10, 64)
|
||||||
|
bindCdnCertResp, err := d.sdkClient.BindCdnCertWithDomain(bindCdnCertId, d.option.DeployConfig.GetConfigAsString("domain"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Wrap(err, "failed to execute sdk request 'cdn.BindCdnCert'")
|
return xerrors.Wrap(err, "failed to execute sdk request 'cdn.BindCdnCert'")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ func (d *TencentCLBDeployer) GetInfos() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *TencentCLBDeployer) Deploy(ctx context.Context) error {
|
func (d *TencentCLBDeployer) Deploy(ctx context.Context) error {
|
||||||
// TODO: 直接部署方式
|
|
||||||
|
|
||||||
switch d.option.DeployConfig.GetConfigAsString("resourceType") {
|
switch d.option.DeployConfig.GetConfigAsString("resourceType") {
|
||||||
case "ssl-deploy":
|
case "ssl-deploy":
|
||||||
// 通过 SSL 服务部署到云资源实例
|
// 通过 SSL 服务部署到云资源实例
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ func (u *DogeCloudUploader) Upload(ctx context.Context, certPem string, privkeyP
|
|||||||
return nil, xerrors.Wrap(err, "failed to execute sdk request 'cdn.UploadCdnCert'")
|
return nil, xerrors.Wrap(err, "failed to execute sdk request 'cdn.UploadCdnCert'")
|
||||||
}
|
}
|
||||||
|
|
||||||
certId = uploadSslCertResp.Data.Id
|
certId = fmt.Sprintf("%d", uploadSslCertResp.Data.Id)
|
||||||
return &uploader.UploadResult{
|
return &uploader.UploadResult{
|
||||||
CertId: certId,
|
CertId: certId,
|
||||||
CertName: certName,
|
CertName: certName,
|
||||||
|
|||||||
4
internal/pkg/vendors/dogecloud-sdk/client.go
vendored
4
internal/pkg/vendors/dogecloud-sdk/client.go
vendored
@@ -58,7 +58,7 @@ func (c *Client) UploadCdnCert(note, cert, private string) (*UploadCdnCertRespon
|
|||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) BindCdnCertWithDomain(certId string, domain string) (*BindCdnCertResponse, error) {
|
func (c *Client) BindCdnCertWithDomain(certId int64, domain string) (*BindCdnCertResponse, error) {
|
||||||
req := &BindCdnCertRequest{
|
req := &BindCdnCertRequest{
|
||||||
CertId: certId,
|
CertId: certId,
|
||||||
Domain: &domain,
|
Domain: &domain,
|
||||||
@@ -92,7 +92,7 @@ func (c *Client) BindCdnCertWithDomain(certId string, domain string) (*BindCdnCe
|
|||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) BindCdnCertWithDomainId(certId string, domainId int32) (*BindCdnCertResponse, error) {
|
func (c *Client) BindCdnCertWithDomainId(certId int64, domainId int64) (*BindCdnCertResponse, error) {
|
||||||
req := &BindCdnCertRequest{
|
req := &BindCdnCertRequest{
|
||||||
CertId: certId,
|
CertId: certId,
|
||||||
DomainId: &domainId,
|
DomainId: &domainId,
|
||||||
|
|||||||
10
internal/pkg/vendors/dogecloud-sdk/models.go
vendored
10
internal/pkg/vendors/dogecloud-sdk/models.go
vendored
@@ -12,20 +12,20 @@ type UploadCdnCertRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type UploadCdnCertResponseData struct {
|
type UploadCdnCertResponseData struct {
|
||||||
Id string `json:"id"`
|
Id int64 `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UploadCdnCertResponse struct {
|
type UploadCdnCertResponse struct {
|
||||||
*BaseResponse
|
BaseResponse
|
||||||
Data *UploadCdnCertResponseData `json:"data,omitempty"`
|
Data *UploadCdnCertResponseData `json:"data,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BindCdnCertRequest struct {
|
type BindCdnCertRequest struct {
|
||||||
CertId string `json:"id"`
|
CertId int64 `json:"id"`
|
||||||
DomainId *int32 `json:"did,omitempty"`
|
DomainId *int64 `json:"did,omitempty"`
|
||||||
Domain *string `json:"domain,omitempty"`
|
Domain *string `json:"domain,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BindCdnCertResponse struct {
|
type BindCdnCertResponse struct {
|
||||||
*BaseResponse
|
BaseResponse
|
||||||
}
|
}
|
||||||
|
|||||||
6
internal/pkg/vendors/qiniu-sdk/models.go
vendored
6
internal/pkg/vendors/qiniu-sdk/models.go
vendored
@@ -24,7 +24,7 @@ type DomainInfoHttpsData struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetDomainInfoResponse struct {
|
type GetDomainInfoResponse struct {
|
||||||
*BaseResponse
|
BaseResponse
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
CName string `json:"cname"`
|
CName string `json:"cname"`
|
||||||
@@ -42,7 +42,7 @@ type ModifyDomainHttpsConfRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ModifyDomainHttpsConfResponse struct {
|
type ModifyDomainHttpsConfResponse struct {
|
||||||
*BaseResponse
|
BaseResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type EnableDomainHttpsRequest struct {
|
type EnableDomainHttpsRequest struct {
|
||||||
@@ -50,5 +50,5 @@ type EnableDomainHttpsRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type EnableDomainHttpsResponse struct {
|
type EnableDomainHttpsResponse struct {
|
||||||
*BaseResponse
|
BaseResponse
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const version = "Certimate v0.2.16";
|
export const version = "Certimate v0.2.18";
|
||||||
|
|||||||
Reference in New Issue
Block a user