From c35eb749c9ca37be9dacdcb1bcdfe45b366d01c3 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 26 May 2026 21:16:03 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E4=B8=8A=E4=BC=A0=E7=9A=84=20TLS=20=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E4=B8=BA=20ACME=20=E7=AE=A1=E7=90=86=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openflare_server/service/tls_certificate.go | 46 +++++++++++++++---- .../components/certificate-apply-modal.tsx | 3 +- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/openflare_server/service/tls_certificate.go b/openflare_server/service/tls_certificate.go index 097b9191..94c10cf6 100644 --- a/openflare_server/service/tls_certificate.go +++ b/openflare_server/service/tls_certificate.go @@ -18,11 +18,24 @@ type TLSCertificateInput struct { } type TLSCertificateContent struct { - ID uint `json:"id"` - Name string `json:"name"` - CertPEM string `json:"cert_pem"` - KeyPEM string `json:"key_pem"` - Remark string `json:"remark"` + ID uint `json:"id"` + Name string `json:"name"` + CertPEM string `json:"cert_pem"` + KeyPEM string `json:"key_pem"` + Remark string `json:"remark"` + Provider string `json:"provider"` + AcmeAccountID uint `json:"acme_account_id"` + DnsAccountID uint `json:"dns_account_id"` + KeyAlgorithm string `json:"key_algorithm"` + AutoRenew bool `json:"auto_renew"` + PrimaryDomain string `json:"primary_domain"` + OtherDomains string `json:"other_domains"` + DisableCNAME bool `json:"disable_cname"` + SkipDNS bool `json:"skip_dns"` + DNS1 string `json:"dns1"` + DNS2 string `json:"dns2"` + ApplyStatus string `json:"apply_status"` + ApplyMessage string `json:"apply_message"` } type TLSApplyInput struct { @@ -65,11 +78,24 @@ func GetTLSCertificateContent(id uint) (*TLSCertificateContent, error) { } return &TLSCertificateContent{ - ID: certificate.ID, - Name: certificate.Name, - CertPEM: certificate.CertPEM, - KeyPEM: certificate.KeyPEM, - Remark: certificate.Remark, + ID: certificate.ID, + Name: certificate.Name, + CertPEM: certificate.CertPEM, + KeyPEM: certificate.KeyPEM, + Remark: certificate.Remark, + Provider: certificate.Provider, + AcmeAccountID: certificate.AcmeAccountID, + DnsAccountID: certificate.DnsAccountID, + KeyAlgorithm: certificate.KeyAlgorithm, + AutoRenew: certificate.AutoRenew, + PrimaryDomain: certificate.PrimaryDomain, + OtherDomains: certificate.OtherDomains, + DisableCNAME: certificate.DisableCNAME, + SkipDNS: certificate.SkipDNS, + DNS1: certificate.DNS1, + DNS2: certificate.DNS2, + ApplyStatus: certificate.ApplyStatus, + ApplyMessage: certificate.ApplyMessage, }, nil } diff --git a/openflare_server/web/features/websites/components/certificate-apply-modal.tsx b/openflare_server/web/features/websites/components/certificate-apply-modal.tsx index 2673470b..70672bda 100644 --- a/openflare_server/web/features/websites/components/certificate-apply-modal.tsx +++ b/openflare_server/web/features/websites/components/certificate-apply-modal.tsx @@ -81,7 +81,8 @@ export function CertificateApplyModal({ other_domains: mode === 'convert-upload' ? '' : certificate.other_domains || '', remark: certificate.remark || '', - acme_account_id: certificate.acme_account_id, + acme_account_id: + mode === 'convert-upload' ? 0 : certificate.acme_account_id, dns_account_id: mode === 'convert-upload' ? 0 : certificate.dns_account_id, key_algorithm: certificate.key_algorithm || 'EC256',