From 5d2844fdb68bdd30ac1d64207c8944af802e68cd Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 7 Nov 2024 15:01:46 +0800 Subject: [PATCH 1/5] fix: #313 --- internal/deployer/dogecloud_cdn.go | 4 +++- internal/pkg/core/uploader/providers/dogecloud/dogecloud.go | 2 +- internal/pkg/vendors/dogecloud-sdk/client.go | 4 ++-- internal/pkg/vendors/dogecloud-sdk/models.go | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/internal/deployer/dogecloud_cdn.go b/internal/deployer/dogecloud_cdn.go index c68cb3ba..55e526c1 100644 --- a/internal/deployer/dogecloud_cdn.go +++ b/internal/deployer/dogecloud_cdn.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "strconv" 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 - 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 { return xerrors.Wrap(err, "failed to execute sdk request 'cdn.BindCdnCert'") } diff --git a/internal/pkg/core/uploader/providers/dogecloud/dogecloud.go b/internal/pkg/core/uploader/providers/dogecloud/dogecloud.go index 2083e314..0dd94391 100644 --- a/internal/pkg/core/uploader/providers/dogecloud/dogecloud.go +++ b/internal/pkg/core/uploader/providers/dogecloud/dogecloud.go @@ -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'") } - certId = uploadSslCertResp.Data.Id + certId = fmt.Sprintf("%d", uploadSslCertResp.Data.Id) return &uploader.UploadResult{ CertId: certId, CertName: certName, diff --git a/internal/pkg/vendors/dogecloud-sdk/client.go b/internal/pkg/vendors/dogecloud-sdk/client.go index 22f6955b..dcca0b1d 100644 --- a/internal/pkg/vendors/dogecloud-sdk/client.go +++ b/internal/pkg/vendors/dogecloud-sdk/client.go @@ -58,7 +58,7 @@ func (c *Client) UploadCdnCert(note, cert, private string) (*UploadCdnCertRespon 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{ CertId: certId, Domain: &domain, @@ -92,7 +92,7 @@ func (c *Client) BindCdnCertWithDomain(certId string, domain string) (*BindCdnCe 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{ CertId: certId, DomainId: &domainId, diff --git a/internal/pkg/vendors/dogecloud-sdk/models.go b/internal/pkg/vendors/dogecloud-sdk/models.go index b721a00e..2fc07fa7 100644 --- a/internal/pkg/vendors/dogecloud-sdk/models.go +++ b/internal/pkg/vendors/dogecloud-sdk/models.go @@ -12,7 +12,7 @@ type UploadCdnCertRequest struct { } type UploadCdnCertResponseData struct { - Id string `json:"id"` + Id int64 `json:"id"` } type UploadCdnCertResponse struct { @@ -21,8 +21,8 @@ type UploadCdnCertResponse struct { } type BindCdnCertRequest struct { - CertId string `json:"id"` - DomainId *int32 `json:"did,omitempty"` + CertId int64 `json:"id"` + DomainId *int64 `json:"did,omitempty"` Domain *string `json:"domain,omitempty"` } From 0dfa5994cced45cea110cc621d6d0afd62e49761 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 7 Nov 2024 17:33:58 +0800 Subject: [PATCH 2/5] fix: #304 --- internal/pkg/vendors/qiniu-sdk/models.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/pkg/vendors/qiniu-sdk/models.go b/internal/pkg/vendors/qiniu-sdk/models.go index b8652fd4..3c68ee6b 100644 --- a/internal/pkg/vendors/qiniu-sdk/models.go +++ b/internal/pkg/vendors/qiniu-sdk/models.go @@ -24,7 +24,7 @@ type DomainInfoHttpsData struct { } type GetDomainInfoResponse struct { - *BaseResponse + BaseResponse Name string `json:"name"` Type string `json:"type"` CName string `json:"cname"` @@ -42,7 +42,7 @@ type ModifyDomainHttpsConfRequest struct { } type ModifyDomainHttpsConfResponse struct { - *BaseResponse + BaseResponse } type EnableDomainHttpsRequest struct { @@ -50,5 +50,5 @@ type EnableDomainHttpsRequest struct { } type EnableDomainHttpsResponse struct { - *BaseResponse + BaseResponse } From 65ecdf7dc20f47fa1a777659070659ba7997f9de Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 7 Nov 2024 15:08:59 +0800 Subject: [PATCH 3/5] update README --- README.md | 2 ++ README_EN.md | 34 +++++++++++--------- internal/pkg/vendors/dogecloud-sdk/models.go | 4 +-- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1d02cadb..0c9a7420 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,10 @@ make local.run | :--------: | :----------: | :----------: | ----------------------------------------------------------------- | | 阿里云 | √ | √ | 可签发在阿里云注册的域名;可部署到阿里云 OSS、CDN、SLB | | 腾讯云 | √ | √ | 可签发在腾讯云注册的域名;可部署到腾讯云 COS、CDN、ECDN、CLB、TEO | +| 百度智能云 | | √ | 可部署到百度智能云 CDN | | 华为云 | √ | √ | 可签发在华为云注册的域名;可部署到华为云 CDN、ELB | | 七牛云 | | √ | 可部署到七牛云 CDN | +| 多吉云 | | √ | 可部署到多吉云 CDN | | AWS | √ | | 可签发在 AWS Route53 托管的域名 | | CloudFlare | √ | | 可签发在 CloudFlare 注册的域名;CloudFlare 服务自带 SSL 证书 | | GoDaddy | √ | | 可签发在 GoDaddy 注册的域名 | diff --git a/README_EN.md b/README_EN.md index 4d70fd8a..4b3c9acf 100644 --- a/README_EN.md +++ b/README_EN.md @@ -70,22 +70,24 @@ password:1234567890 ## List of Supported Providers -| Provider | Registration | Deployment | Remarks | -| :-----------: | :----------: | :--------: | --------------------------------------------------------------------------------------------------------------------- | -| 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 | -| Huawei Cloud | √ | √ | Supports domains registered on Huawei Cloud; supports deployment to Huawei Cloud CDN, ELB | -| Qiniu Cloud | | √ | Supports deployment to Qiniu Cloud CDN | -| AWS | √ | | Supports domains managed on AWS Route53 | -| CloudFlare | √ | | Supports domains registered on CloudFlare; CloudFlare services come with SSL certificates | -| GoDaddy | √ | | Supports domains registered on GoDaddy | -| Namesilo | √ | | Supports domains registered on Namesilo | -| PowerDNS | √ | | Supports domains managed on PowerDNS | -| HTTP Request | √ | | Supports domains which allow managing DNS by HTTP request | -| Local Deploy | | √ | Supports deployment to local servers | -| SSH | | √ | Supports deployment to SSH servers | -| Webhook | | √ | Supports callback to Webhook | -| Kubernetes | | √ | Supports deployment to Kubernetes Secret | +| Provider | Registration | Deployment | Remarks | +| :-----------: | :----------: | :--------: | ----------------------------------------------------------------------------------------------------------- | +| 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 | +| Baidu Cloud | | √ | Supports deployment to Baidu Cloud CDN | +| Huawei Cloud | √ | √ | Supports domains registered on Huawei Cloud; supports deployment to Huawei Cloud CDN, ELB | +| Qiniu Cloud | | √ | Supports deployment to Qiniu Cloud CDN | +| Doge Cloud | | √ | Supports deployment to Doge Cloud CDN | +| AWS | √ | | Supports domains managed on AWS Route53 | +| CloudFlare | √ | | Supports domains registered on CloudFlare; CloudFlare services come with SSL certificates | +| GoDaddy | √ | | Supports domains registered on GoDaddy | +| Namesilo | √ | | Supports domains registered on Namesilo | +| PowerDNS | √ | | Supports domains managed on PowerDNS | +| HTTP Request | √ | | Supports domains which allow managing DNS by HTTP request | +| Local Deploy | | √ | Supports deployment to local servers | +| SSH | | √ | Supports deployment to SSH servers | +| Webhook | | √ | Supports callback to Webhook | +| Kubernetes | | √ | Supports deployment to Kubernetes Secret | ## Screenshots diff --git a/internal/pkg/vendors/dogecloud-sdk/models.go b/internal/pkg/vendors/dogecloud-sdk/models.go index 2fc07fa7..06507e0d 100644 --- a/internal/pkg/vendors/dogecloud-sdk/models.go +++ b/internal/pkg/vendors/dogecloud-sdk/models.go @@ -16,7 +16,7 @@ type UploadCdnCertResponseData struct { } type UploadCdnCertResponse struct { - *BaseResponse + BaseResponse Data *UploadCdnCertResponseData `json:"data,omitempty"` } @@ -27,5 +27,5 @@ type BindCdnCertRequest struct { } type BindCdnCertResponse struct { - *BaseResponse + BaseResponse } From cf005711c019395b85fa725ac711504f48f1ac76 Mon Sep 17 00:00:00 2001 From: yoan <536464346@qq.com> Date: Fri, 8 Nov 2024 08:11:04 +0800 Subject: [PATCH 4/5] v0.2.17 --- ui/src/domain/version.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/domain/version.ts b/ui/src/domain/version.ts index 8b42c85f..1300d70d 100644 --- a/ui/src/domain/version.ts +++ b/ui/src/domain/version.ts @@ -1 +1 @@ -export const version = "Certimate v0.2.16"; +export const version = "Certimate v0.2.17"; From 35e1bfcd7ff1cf02cc0cd64473b60d5f07b7ccf1 Mon Sep 17 00:00:00 2001 From: yoan <536464346@qq.com> Date: Sat, 9 Nov 2024 11:37:34 +0800 Subject: [PATCH 5/5] Update readme --- README.md | 17 ++++++++--------- README_EN.md | 16 +++++++--------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 0c9a7420..da3fde6d 100644 --- a/README.md +++ b/README.md @@ -92,15 +92,13 @@ make local.run ## 四、系统截图 -![login](https://i.imgur.com/SYjjbql.jpeg) - -![dashboard](https://i.imgur.com/WMVbBId.jpeg) - -![domains](https://i.imgur.com/8wit3ZA.jpeg) - -![accesses](https://i.imgur.com/EWtOoJ0.jpeg) - -![history](https://i.imgur.com/aaPtSW7.jpeg) +
+ + + + + +
## 五、概念 @@ -190,3 +188,4 @@ Certimate 是一个免费且开源的项目,采用 [MIT 开源协议](LICENSE. ## 十、Star 趋势图 [![Stargazers over time](https://starchart.cc/usual2970/certimate.svg?variant=adaptive)](https://starchart.cc/usual2970/certimate) + diff --git a/README_EN.md b/README_EN.md index 4b3c9acf..eddcea05 100644 --- a/README_EN.md +++ b/README_EN.md @@ -91,15 +91,13 @@ password:1234567890 ## Screenshots -![login](https://i.imgur.com/SYjjbql.jpeg) - -![dashboard](https://i.imgur.com/WMVbBId.jpeg) - -![domains](https://i.imgur.com/8wit3ZA.jpeg) - -![accesses](https://i.imgur.com/EWtOoJ0.jpeg) - -![history](https://i.imgur.com/aaPtSW7.jpeg) +
+ + + + + +
## Concepts