This page documents the custom SDK clients and provider implementations for server management panels and infrastructure tools within Certimate. These integrations allow Certimate to deploy and manage certificates on targets like BaoTa Panel, 1Panel, Nginx Proxy Manager, APISIX, Kong, Proxmox VE, Synology DSM, and various CDN platforms.
Certimate interacts with third-party infrastructure through two primary layers:
pkg/sdk3rd/): Custom Go clients for providers that do not offer official Go SDKs or require specialized API handling (e.g., BaoTa's API key/token signing or 1Panel's custom REST client).pkg/core/deployer/providers/): Logic that uses the SDKs to perform specific actions like uploading a certificate or updating a website's SSL configuration.The following diagram maps the high-level infrastructure systems to their corresponding code entities in the backend.
Sources: pkg/core/deployer/providers/apisix/apisix.go11-13 pkg/core/deployer/providers/baotawaf/baotawaf.go13-14 pkg/core/deployer/providers/nginxproxymanager/nginxproxymanager.go14-16 pkg/core/deployer/providers/unicloud-webhost/unicloud_webhost.go9-10 pkg/core/deployer/providers/kong/kong.go11-13 pkg/core/deployer/providers/samwaf-console/samwaf_console.go12-14 pkg/core/deployer/providers/mohua-mvh/mohua_mvh.go12-14
The 1Panel integration handles both certificate management (upload/replace) and website deployment. It supports both v1 and v2 of the 1Panel API pkg/sdk3rd/1panel/v2/client.go2-3
The v2 client uses a signer for API requests pkg/sdk3rd/1panel/v2/client.go39-42 It targets the /api/v2 base path and includes a CurrentNode header for multi-node panel management pkg/sdk3rd/1panel/v2/client.go43-47
The Certmgr for 1Panel pkg/core/certmgr/providers/1panel/1panel.go37-41 performs the following:
tryGetResultIfCertExists which iterates through existing certificates using WebsiteSSLSearchWithContext pkg/core/certmgr/providers/1panel/1panel.go176-224certimate-1700000000000) and calls WebsiteSSLUploadWithContext pkg/core/certmgr/providers/1panel/1panel.go79-116SSLID provided pkg/core/certmgr/providers/1panel/1panel.go128-174Sources: pkg/sdk3rd/1panel/v2/client.go23-57 pkg/core/certmgr/providers/1panel/1panel.go70-126
The NPM integration provides robust certificate management and deployment to proxy hosts, streams, and redirection hosts.
The SDK client uses resty and implements a SetPreRequestHook to automatically inject the Bearer token pkg/sdk3rd/nginxproxymanager/client.go57-63 It handles authentication via the /tokens endpoint using the user's identity and secret pkg/sdk3rd/nginxproxymanager/client.go139-177
NginxUploadCertificateWithContext handles pushing new PEM/Key files.NginxListCertificatesWithContext allows finding existing certificates by domain to avoid duplicates.NginxUpdateProxyHostWithContext updates SSL settings for standard HTTP/HTTPS proxies.NginxUpdateStreamWithContext manages TCP/UDP stream SSL.Sources: pkg/sdk3rd/nginxproxymanager/client.go21-66 pkg/sdk3rd/nginxproxymanager/client.go139-177
Both gateways use specialized SDKs to manage SSL/Certificate resources via their respective Admin APIs.
The APISIX client targets the Admin API at /apisix/admin pkg/sdk3rd/apisix/client.go39 It requires an ApiKey passed in the X-Api-Key header pkg/sdk3rd/apisix/client.go43
The Kong client supports optional workspaces by appending the workspace name to the base URL pkg/sdk3rd/kong/client.go35-39 Authentication uses the Kong-Admin-Token header pkg/sdk3rd/kong/client.go46-49
Sources: pkg/sdk3rd/apisix/client.go18-46 pkg/sdk3rd/kong/client.go18-51
The Proxmox VE integration allows uploading custom certificates to specific nodes via the PVE API.
The SDK provides NodeUploadCustomCertificateWithContext pkg/sdk3rd/proxmoxve/api_node_upload_custom_certificate.go27-47 It targets the REST path /nodes/{node}/certificates/custom using a POST request pkg/sdk3rd/proxmoxve/api_node_upload_custom_certificate.go32-33
Authentication is handled via the PVEAPIToken header using the format PVEAPIToken=ID=Secret pkg/sdk3rd/proxmoxve/client.go44 The client also enforces a /api2/json suffix on the server URL pkg/sdk3rd/proxmoxve/client.go42
Sources: pkg/sdk3rd/proxmoxve/client.go22-49 pkg/sdk3rd/proxmoxve/api_node_upload_custom_certificate.go23-47
These panels use modern RESTful APIs with token-based authentication.
The RatPanel client (also known as AcePanel) implements a custom request signer using AccessTokenId and AccessToken pkg/sdk3rd/ratpanel/client.go42-45 It verifies responses by checking if the message is "success" pkg/sdk3rd/ratpanel/client.go121-123
The Mohua client uses a /v1/login_api endpoint to obtain a JWT if one isn't provided pkg/sdk3rd/mohua/client.go130-166 It provides specific APIs for listing virtual host domains pkg/sdk3rd/mohua/api_list_virtualhost_domains.go18-42 and setting virtual host SSL pkg/sdk3rd/mohua/api_set_virtualhost_ssl.go18-42
Sources: pkg/sdk3rd/ratpanel/client.go19-59 pkg/sdk3rd/mohua/client.go18-57
Most custom SDKs follow a consistent pattern using the resty library.
Sources: pkg/sdk3rd/nginxproxymanager/client.go139-177 pkg/sdk3rd/mohua/client.go101-128 pkg/sdk3rd/proxmoxve/client.go93-113 pkg/sdk3rd/apisix/client.go90-110 pkg/sdk3rd/kong/client.go95-115
| Platform | SDK Path | Auth Mechanism | Key Feature |
|---|---|---|---|
| 1Panel | pkg/sdk3rd/1panel | API Key + Signer | Support for v1 and v2 APIs |
| NPM | pkg/sdk3rd/nginxproxymanager | JWT / Password | Support for Proxy, Stream, and Redirection hosts |
| APISIX | pkg/sdk3rd/apisix | X-Api-Key | Admin API SSL resource updates |
| Kong | pkg/sdk3rd/kong | Kong-Admin-Token | Workspace-aware certificate management |
| Proxmox VE | pkg/sdk3rd/proxmoxve | PVEAPIToken | Node-specific custom cert upload |
| RatPanel | pkg/sdk3rd/ratpanel | Token + Signer | AcePanel API integration |
| Mohua MVH | pkg/sdk3rd/mohua | JWT | Virtual host SSL management |
| QingCloud DNS | pkg/sdk3rd/qingcloud/dns | AccessKey/Secret | Routewize API integration with signing |
| DogeCloud | pkg/sdk3rd/dogecloud | AccessKey/Secret | Custom request signing for CDN/Storage |
| Dokploy | pkg/sdk3rd/dokploy | X-Api-Key | Simple REST client for Dokploy API |
| BaoTa Panel | pkg/sdk3rd/btpanel | API Key + Signer | Support for site-specific deployment |
| BaoTa Panel (Go) | pkg/sdk3rd/btpanelgo | API Key | Go-based variant of BaoTa Panel |
| Dynv6 | pkg/sdk3rd/dynv6 | Bearer Token | Simple API client for Dynv6 DNS |
Sources: pkg/sdk3rd/1panel/v2/client.go39-55 pkg/sdk3rd/proxmoxve/client.go41-46 pkg/sdk3rd/ratpanel/client.go46-57 pkg/sdk3rd/qingcloud/dns/client.go33-50 pkg/sdk3rd/dogecloud/client.go33-49 pkg/sdk3rd/dokploy/client.go38-45 pkg/sdk3rd/dynv6/client.go29-34
Refresh this wiki
This wiki was recently refreshed. Please wait 7 days to refresh again.