Compare commits

...

16 Commits

Author SHA1 Message Date
Yoan.liu
3c4ffee7d3 Update push_image.yml 2025-03-11 06:35:41 +08:00
Yoan.liu
3e1a457609 update to version v0.3.3 2025-03-10 21:33:06 +08:00
Yoan.liu
b28f0dc5e4 Merge pull request #504 from fudiwei/main
bugfix
2025-03-10 21:15:23 +08:00
Yoan.liu
29561ed75d Merge pull request #505 from usual2970/feat/image_tags
镜像增加大版本 tag
2025-03-10 21:14:47 +08:00
Yoan.liu
2e931d1f67 when tagging the image, also tag the major version 2025-03-10 16:33:28 +08:00
Fu Diwei
c907f22275 fix: wrong detection results of certificate key algorithm 2025-03-10 16:18:30 +08:00
Fu Diwei
19ccac5c05 build: set timezone in docker-compose 2025-03-10 15:22:25 +08:00
Fu Diwei
f9e3797cdd feat: default set autoRestart on deployment to 1panel or baotapanel 2025-03-10 15:13:41 +08:00
RHQYZ
a30379bfdb Merge branch 'usual2970:main' into main 2025-03-10 13:48:47 +08:00
Yoan.liu
dad1b4dfa6 update to version v0.3.2 2025-03-10 06:49:57 +08:00
Fu Diwei
643e09a4e6 fix: typo 2025-03-09 13:04:27 +08:00
Fu Diwei
56fc2d8b44 fix: invalid version checker 2025-03-09 12:57:01 +08:00
Yoan.liu
786f2f8678 Merge pull request #498 from usual2970/hotfix/workflow
fix the issue where the deployment node could not set the certificate…
2025-03-09 12:42:22 +08:00
Yoan.liu
ed689dba41 restore currentlength 2025-03-09 12:40:32 +08:00
Yoan.liu
f779117ed6 fix the issue where the deployment node could not set the certificate source. 2025-03-09 12:23:14 +08:00
Fu Diwei
c9e7e00f42 update README 2025-03-09 11:03:32 +08:00
11 changed files with 95 additions and 35 deletions

View File

@@ -34,6 +34,11 @@ jobs:
images: |
usual2970/certimate
registry.cn-shanghai.aliyuncs.com/usual2970/certimate
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
- name: Log in to DOCKERHUB
uses: docker/login-action@v3
@@ -56,3 +61,4 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}

View File

@@ -36,9 +36,10 @@ Certimate 旨在为用户提供一个安全、简便的 SSL 证书管理解决
## 💡 功能特性
- 灵活的工作流编排方式,证书从申请到部署完全自动化;
- 支持域名、多域名证书,可选 RSA、ECC 签名算法;
- 支持 20+ 域名托管商如阿里云、腾讯云、Cloudflare 等)
- 支持 50+ 部署目标(如 Kubernetes、CDN、WAF、负载均衡等
- 支持域名、多域名、泛域名证书,可选 RSA、ECC 签名算法;
- 支持 PEM、PFX、JKS 等多种格式输出证书
- 支持 20+ 域名托管商如阿里云、腾讯云、Cloudflare 等,[点此查看](https://docs.certimate.me/docs/reference/providers#supported-dns-providers)完整提供商清单
- 支持 60+ 部署目标(如 Kubernetes、CDN、WAF、负载均衡等[点此查看](https://docs.certimate.me/docs/reference/providers#supported-host-providers)完整提供商清单);
- 支持邮件、钉钉、飞书、企业微信、Webhook 等多种通知渠道;
- 支持 Let's Encrypt、ZeroSSL、Google Trust Services 等多种 ACME 证书颁发机构;
- 更多特性等待探索。

View File

@@ -35,12 +35,13 @@ Certimate aims to provide users with a secure and user-friendly SSL certificate
## 💡 Features
- Flexible workflow orchestration, fully automated from certificate application to deployment;
- Supports wildcard, multi-domain certificates, with options for RSA or ECC.
- Supports more than 20+ domain registrars (e.g., Alibaba Cloud, Tencent Cloud, Cloudflare, etc.);
- Supports more than 50+ deployment targets (e.g., Kubernetes, CDN, WAF, load balancers, etc.);
- Flexible workflow orchestration, fully automation from certificate application to deployment;
- Supports single-domain, multi-domain, wildcard certificates, with options for RSA or ECC.
- Supports various certificate formats such as PEM, PFX, JKS.
- Supports more than 20+ domain registrars (e.g., Alibaba Cloud, Tencent Cloud, Cloudflare, etc. [Check out this link](https://docs.certimate.me/en/docs/reference/providers#supported-dns-providers));
- Supports more than 60+ deployment targets (e.g., Kubernetes, CDN, WAF, load balancers, etc. [Check out this link](https://docs.certimate.me/en/docs/reference/providers#supported-host-providers));
- Supports multiple notification channels including email, DingTalk, Feishu, WeCom, Webhook, and more;
- Supports multiple certificate authorities including Let's Encrypt, ZeroSSL, Google Trust Services, and more;
- Supports multiple ACME CAs including Let's Encrypt, ZeroSSL, Google Trust Services, and more;
- More features waiting to be discovered.
## ⏱️ Fast Track

View File

@@ -6,5 +6,7 @@ services:
ports:
- 8090:8090
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./data:/app/pb_data
restart: unless-stopped

View File

@@ -1,7 +1,10 @@
package domain
import (
"crypto/ecdsa"
"crypto/rsa"
"crypto/x509"
"fmt"
"strings"
"time"
@@ -39,19 +42,58 @@ func (c *Certificate) PopulateFromX509(certX509 *x509.Certificate) *Certificate
c.EffectAt = certX509.NotBefore
c.ExpireAt = certX509.NotAfter
switch certX509.SignatureAlgorithm {
case x509.SHA256WithRSA, x509.SHA256WithRSAPSS:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeRSA2048
case x509.SHA384WithRSA, x509.SHA384WithRSAPSS:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeRSA3072
case x509.SHA512WithRSA, x509.SHA512WithRSAPSS:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeRSA4096
case x509.ECDSAWithSHA256:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeEC256
case x509.ECDSAWithSHA384:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeEC384
case x509.ECDSAWithSHA512:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeEC512
switch certX509.PublicKeyAlgorithm {
case x509.RSA:
{
len := 0
if pubkey, ok := certX509.PublicKey.(*rsa.PublicKey); ok {
len = pubkey.N.BitLen()
}
switch len {
case 0:
c.KeyAlgorithm = CertificateKeyAlgorithmType("RSA")
case 2048:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeRSA2048
case 3072:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeRSA3072
case 4096:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeRSA4096
case 8192:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeRSA8192
default:
c.KeyAlgorithm = CertificateKeyAlgorithmType(fmt.Sprintf("RSA%d", len))
}
}
case x509.ECDSA:
{
len := 0
if pubkey, ok := certX509.PublicKey.(*ecdsa.PublicKey); ok {
if pubkey.Curve != nil && pubkey.Curve.Params() != nil {
len = pubkey.Curve.Params().BitSize
}
}
switch len {
case 0:
c.KeyAlgorithm = CertificateKeyAlgorithmType("EC")
case 256:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeEC256
case 384:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeEC384
case 521:
c.KeyAlgorithm = CertificateKeyAlgorithmTypeEC512
default:
c.KeyAlgorithm = CertificateKeyAlgorithmType(fmt.Sprintf("EC%d", len))
}
}
case x509.Ed25519:
{
c.KeyAlgorithm = CertificateKeyAlgorithmType("ED25519")
}
default:
c.KeyAlgorithm = CertificateKeyAlgorithmType("")
}

View File

@@ -62,14 +62,14 @@ type WorkflowNode struct {
}
type WorkflowNodeConfigForApply struct {
Domains string `json:"domains"` // 域名列表,以半角号分隔
Domains string `json:"domains"` // 域名列表,以半角号分隔
ContactEmail string `json:"contactEmail"` // 联系邮箱
ChallengeType string `json:"challengeType"` // TODO: 验证方式。目前仅支持 dns-01
Provider string `json:"provider"` // DNS 提供商
ProviderAccessId string `json:"providerAccessId"` // DNS 提供商授权记录 ID
ProviderConfig map[string]any `json:"providerConfig"` // DNS 提供商额外配置
KeyAlgorithm string `json:"keyAlgorithm"` // 密钥算法
Nameservers string `json:"nameservers"` // DNS 服务器列表,以半角号分隔
Nameservers string `json:"nameservers"` // DNS 服务器列表,以半角号分隔
DnsPropagationTimeout int32 `json:"dnsPropagationTimeout"` // DNS 传播超时时间(零值取决于提供商的默认值)
DnsTTL int32 `json:"dnsTTL"` // DNS TTL零值取决于提供商的默认值
DisableFollowCNAME bool `json:"disableFollowCNAME"` // 是否关闭 CNAME 跟随

View File

@@ -16,7 +16,9 @@ export type DeployNodeConfigForm1PanelConsoleConfigProps = {
};
const initFormModel = (): DeployNodeConfigForm1PanelConsoleConfigFieldValues => {
return {};
return {
autoRestart: true,
};
};
const DeployNodeConfigForm1PanelConsoleConfig = ({

View File

@@ -16,7 +16,9 @@ export type DeployNodeConfigFormBaotaPanelConsoleConfigProps = {
};
const initFormModel = (): DeployNodeConfigFormBaotaPanelConsoleConfigFieldValues => {
return {};
return {
autoRestart: true,
};
};
const DeployNodeConfigFormBaotaPanelConsoleConfig = ({

View File

@@ -1 +1 @@
export const version = "v0.3.1";
export const version = "v0.3.3";

View File

@@ -436,11 +436,6 @@ export const getOutputBeforeNodeId = (root: WorkflowNode, nodeId: string, type:
return true;
}
// 如果当前节点是 ExecuteFailure清除 ExecuteResultBranch 节点前一个节点的输出
if (current.type === WorkflowNodeType.ExecuteFailure) {
output.splice(output.length - 1);
}
if (current.type !== WorkflowNodeType.Branch && current.outputs && current.outputs.some((io) => io.type === type)) {
output.push({
...current,
@@ -449,8 +444,13 @@ export const getOutputBeforeNodeId = (root: WorkflowNode, nodeId: string, type:
}
if (isBranchLike(current)) {
const currentLength = output.length;
let currentLength = output.length;
const latestOutput = output.length > 0 ? output[output.length - 1] : null;
for (const branch of current.branches!) {
if (branch.type === WorkflowNodeType.ExecuteFailure) {
output.splice(output.length - 1);
currentLength -= 1;
}
if (traverse(branch, output)) {
return true;
}
@@ -458,6 +458,10 @@ export const getOutputBeforeNodeId = (root: WorkflowNode, nodeId: string, type:
if (output.length > currentLength) {
output.splice(currentLength);
}
if (latestOutput && branch.type === WorkflowNodeType.ExecuteFailure) {
output.push(latestOutput);
currentLength += 1;
}
}
}

View File

@@ -4,7 +4,7 @@ import { version } from "@/domain/version";
export type UseVersionCheckerReturns = {
hasNewVersion: boolean;
check: () => void;
checkNewVersion: () => void;
};
const extractSemver = (vers: string) => {
@@ -48,7 +48,7 @@ const useVersionChecker = () => {
}
const nIdx = releases.findIndex((e: any) => compareVersions(e.name, version) !== -1);
if (cIdx >= nIdx) {
if (cIdx !== -1 && cIdx <= nIdx) {
return false;
}
@@ -63,7 +63,7 @@ const useVersionChecker = () => {
return {
hasNewVersion: !!data,
check: refresh,
checkNewVersion: refresh,
};
};