diff --git a/internal/applicant/providers.go b/internal/applicant/providers.go index de47ae18..3e4de205 100644 --- a/internal/applicant/providers.go +++ b/internal/applicant/providers.go @@ -476,7 +476,7 @@ func createApplicantProvider(options *applicantProviderOptions) (challenge.Provi } applicant, err := pPowerDNS.NewChallengeProvider(&pPowerDNS.ChallengeProviderConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiKey: access.ApiKey, AllowInsecureConnections: access.AllowInsecureConnections, DnsPropagationTimeout: options.DnsPropagationTimeout, diff --git a/internal/deployer/providers.go b/internal/deployer/providers.go index d1d72408..e8dbaf1a 100644 --- a/internal/deployer/providers.go +++ b/internal/deployer/providers.go @@ -119,7 +119,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer switch options.Provider { case domain.DeploymentProviderType1PanelConsole: deployer, err := p1PanelConsole.NewDeployer(&p1PanelConsole.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiVersion: access.ApiVersion, ApiKey: access.ApiKey, AllowInsecureConnections: access.AllowInsecureConnections, @@ -129,7 +129,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer case domain.DeploymentProviderType1PanelSite: deployer, err := p1PanelSite.NewDeployer(&p1PanelSite.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiVersion: access.ApiVersion, ApiKey: access.ApiKey, AllowInsecureConnections: access.AllowInsecureConnections, @@ -454,7 +454,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer switch options.Provider { case domain.DeploymentProviderTypeBaotaPanelConsole: deployer, err := pBaotaPanelConsole.NewDeployer(&pBaotaPanelConsole.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiKey: access.ApiKey, AllowInsecureConnections: access.AllowInsecureConnections, AutoRestart: maputil.GetBool(options.ProviderServiceConfig, "autoRestart"), @@ -463,7 +463,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer case domain.DeploymentProviderTypeBaotaPanelSite: deployer, err := pBaotaPanelSite.NewDeployer(&pBaotaPanelSite.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiKey: access.ApiKey, AllowInsecureConnections: access.AllowInsecureConnections, SiteType: maputil.GetOrDefaultString(options.ProviderServiceConfig, "siteType", "other"), @@ -487,7 +487,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer switch options.Provider { case domain.DeploymentProviderTypeBaotaWAFConsole: deployer, err := pBaotaWAFConsole.NewDeployer(&pBaotaWAFConsole.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiKey: access.ApiKey, AllowInsecureConnections: access.AllowInsecureConnections, }) @@ -495,7 +495,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer case domain.DeploymentProviderTypeBaotaWAFSite: deployer, err := pBaotaWAFSite.NewDeployer(&pBaotaWAFSite.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiKey: access.ApiKey, AllowInsecureConnections: access.AllowInsecureConnections, SiteName: maputil.GetString(options.ProviderServiceConfig, "siteName"), @@ -565,7 +565,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer } deployer, err := pCdnfly.NewDeployer(&pCdnfly.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiKey: access.ApiKey, ApiSecret: access.ApiSecret, AllowInsecureConnections: access.AllowInsecureConnections, @@ -614,7 +614,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer } deployer, err := pFlexCDN.NewDeployer(&pFlexCDN.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiRole: access.ApiRole, AccessKeyId: access.AccessKeyId, AccessKey: access.AccessKey, @@ -654,7 +654,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer } deployer, err := pGoEdge.NewDeployer(&pGoEdge.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiRole: access.ApiRole, AccessKeyId: access.AccessKeyId, AccessKey: access.AccessKey, @@ -773,7 +773,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer } deployer, err := pLeCDN.NewDeployer(&pLeCDN.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiVersion: access.ApiVersion, ApiRole: access.ApiRole, Username: access.Username, @@ -845,7 +845,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer } deployer, err := pProxmoxVE.NewDeployer(&pProxmoxVE.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiToken: access.ApiToken, ApiTokenSecret: access.ApiTokenSecret, AllowInsecureConnections: access.AllowInsecureConnections, @@ -916,7 +916,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer switch options.Provider { case domain.DeploymentProviderTypeRatPanelConsole: deployer, err := pRatPanelConsole.NewDeployer(&pRatPanelConsole.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, AccessTokenId: access.AccessTokenId, AccessToken: access.AccessToken, AllowInsecureConnections: access.AllowInsecureConnections, @@ -925,7 +925,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer case domain.DeploymentProviderTypeRatPanelSite: deployer, err := pRatPanelSite.NewDeployer(&pRatPanelSite.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, AccessTokenId: access.AccessTokenId, AccessToken: access.AccessToken, AllowInsecureConnections: access.AllowInsecureConnections, @@ -946,7 +946,7 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer } deployer, err := pSafeLine.NewDeployer(&pSafeLine.DeployerConfig{ - ApiUrl: access.ApiUrl, + ServerUrl: access.ServerUrl, ApiToken: access.ApiToken, AllowInsecureConnections: access.AllowInsecureConnections, ResourceType: pSafeLine.ResourceType(maputil.GetString(options.ProviderServiceConfig, "resourceType")), diff --git a/internal/domain/access.go b/internal/domain/access.go index 13975392..7e1549f1 100644 --- a/internal/domain/access.go +++ b/internal/domain/access.go @@ -16,7 +16,7 @@ type Access struct { } type AccessConfigFor1Panel struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiVersion string `json:"apiVersion"` ApiKey string `json:"apiKey"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` @@ -62,13 +62,13 @@ type AccessConfigForBaishan struct { } type AccessConfigForBaotaPanel struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiKey string `json:"apiKey"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` } type AccessConfigForBaotaWAF struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiKey string `json:"apiKey"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` } @@ -87,7 +87,7 @@ type AccessConfigForCacheFly struct { } type AccessConfigForCdnfly struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiKey string `json:"apiKey"` ApiSecret string `json:"apiSecret"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` @@ -147,7 +147,7 @@ type AccessConfigForEmail struct { } type AccessConfigForFlexCDN struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiRole string `json:"apiRole"` AccessKeyId string `json:"accessKeyId"` AccessKey string `json:"accessKey"` @@ -169,7 +169,7 @@ type AccessConfigForGoDaddy struct { } type AccessConfigForGoEdge struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiRole string `json:"apiRole"` AccessKeyId string `json:"accessKeyId"` AccessKey string `json:"accessKey"` @@ -200,7 +200,7 @@ type AccessConfigForLarkBot struct { } type AccessConfigForLeCDN struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiVersion string `json:"apiVersion"` ApiRole string `json:"apiRole"` Username string `json:"username"` @@ -249,13 +249,13 @@ type AccessConfigForPorkbun struct { } type AccessConfigForPowerDNS struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiKey string `json:"apiKey"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` } type AccessConfigForProxmoxVE struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiToken string `json:"apiToken"` ApiTokenSecret string `json:"apiTokenSecret,omitempty"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` @@ -271,14 +271,14 @@ type AccessConfigForRainYun struct { } type AccessConfigForRatPanel struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` AccessTokenId int32 `json:"accessTokenId"` AccessToken string `json:"accessToken"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` } type AccessConfigForSafeLine struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiToken string `json:"apiToken"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` } diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/aliyun-esa/internal/lego.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/aliyun-esa/internal/lego.go index 51d4e7c4..5a576af1 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/aliyun-esa/internal/lego.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/aliyun-esa/internal/lego.go @@ -102,9 +102,10 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error { return fmt.Errorf("alicloud-esa: could not find zone for domain %q: %w", domain, err) } - siteId, err := d.getSiteId(strings.TrimRight(authZone, ".")) + siteName := strings.TrimRight(authZone, ".") + siteId, err := d.getSiteId(siteName) if err != nil { - return fmt.Errorf("alicloud-esa: could not find site for zone %q: %w", authZone, err) + return fmt.Errorf("alicloud-esa: could not find site for zone %q: %w", siteName, err) } if err := d.addOrUpdateDNSRecord(siteId, strings.TrimRight(info.EffectiveFQDN, "."), info.Value); err != nil { @@ -122,9 +123,10 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error { return fmt.Errorf("alicloud-esa: could not find zone for domain %q: %w", domain, err) } - siteId, err := d.getSiteId(strings.TrimRight(authZone, ".")) + siteName := strings.TrimRight(authZone, ".") + siteId, err := d.getSiteId(siteName) if err != nil { - return fmt.Errorf("alicloud-esa: could not find site for zone %q: %w", authZone, err) + return fmt.Errorf("alicloud-esa: could not find site for zone %q: %w", siteName, err) } if err := d.removeDNSRecord(siteId, strings.TrimRight(info.EffectiveFQDN, ".")); err != nil { diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/powerdns/powerdns.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/powerdns/powerdns.go index 7630633c..b34516d4 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/powerdns/powerdns.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/powerdns/powerdns.go @@ -11,7 +11,7 @@ import ( ) type ChallengeProviderConfig struct { - ApiUrl string `json:"apiUrl"` + ServerUrl string `json:"serverUrl"` ApiKey string `json:"apiKey"` AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"` DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` @@ -23,9 +23,9 @@ func NewChallengeProvider(config *ChallengeProviderConfig) (challenge.Provider, panic("config is nil") } - host, _ := url.Parse(config.ApiUrl) + serverUrl, _ := url.Parse(config.ServerUrl) providerConfig := pdns.NewDefaultConfig() - providerConfig.Host = host + providerConfig.Host = serverUrl providerConfig.APIKey = config.ApiKey if config.AllowInsecureConnections { providerConfig.HTTPClient.Transport = &http.Transport{ diff --git a/internal/pkg/core/deployer/providers/1panel-console/1panel_console.go b/internal/pkg/core/deployer/providers/1panel-console/1panel_console.go index e81b264f..0f7efed1 100644 --- a/internal/pkg/core/deployer/providers/1panel-console/1panel_console.go +++ b/internal/pkg/core/deployer/providers/1panel-console/1panel_console.go @@ -13,8 +13,8 @@ import ( ) type DeployerConfig struct { - // 1Panel 地址。 - ApiUrl string `json:"apiUrl"` + // 1Panel 服务地址。 + ServerUrl string `json:"serverUrl"` // 1Panel 版本。 // 可取值 "v1"、"v2"。 ApiVersion string `json:"apiVersion"` @@ -39,7 +39,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiVersion, config.ApiKey, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiVersion, config.ApiKey, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/1panel-console/1panel_console_test.go b/internal/pkg/core/deployer/providers/1panel-console/1panel_console_test.go index 88bf961a..0feae021 100644 --- a/internal/pkg/core/deployer/providers/1panel-console/1panel_console_test.go +++ b/internal/pkg/core/deployer/providers/1panel-console/1panel_console_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiVersion string fApiKey string ) @@ -24,7 +24,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiVersion, argsPrefix+"APIVERSION", "v1", "") flag.StringVar(&fApiKey, argsPrefix+"APIKEY", "", "") } @@ -35,7 +35,7 @@ Shell command to run this test: go test -v ./1panel_console_test.go -args \ --CERTIMATE_DEPLOYER_1PANELCONSOLE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_1PANELCONSOLE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_1PANELCONSOLE_APIURL="http://127.0.0.1:20410" \ + --CERTIMATE_DEPLOYER_1PANELCONSOLE_SERVERURL="http://127.0.0.1:20410" \ --CERTIMATE_DEPLOYER_1PANELCONSOLE_APIVERSION="v1" \ --CERTIMATE_DEPLOYER_1PANELCONSOLE_APIKEY="your-api-key" */ @@ -47,13 +47,13 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIVERSION: %v", fApiVersion), fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiVersion: fApiVersion, ApiKey: fApiKey, AllowInsecureConnections: true, diff --git a/internal/pkg/core/deployer/providers/1panel-site/1panel_site.go b/internal/pkg/core/deployer/providers/1panel-site/1panel_site.go index 690e5242..a546c1bb 100644 --- a/internal/pkg/core/deployer/providers/1panel-site/1panel_site.go +++ b/internal/pkg/core/deployer/providers/1panel-site/1panel_site.go @@ -16,8 +16,8 @@ import ( ) type DeployerConfig struct { - // 1Panel 地址。 - ApiUrl string `json:"apiUrl"` + // 1Panel 服务地址。 + ServerUrl string `json:"serverUrl"` // 1Panel 版本。 // 可取值 "v1"、"v2"。 ApiVersion string `json:"apiVersion"` @@ -49,13 +49,13 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiVersion, config.ApiKey, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiVersion, config.ApiKey, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } uploader, err := uploadersp.NewUploader(&uploadersp.UploaderConfig{ - ApiUrl: config.ApiUrl, + ServerUrl: config.ServerUrl, ApiVersion: config.ApiVersion, ApiKey: config.ApiKey, }) diff --git a/internal/pkg/core/deployer/providers/1panel-site/1panel_site_test.go b/internal/pkg/core/deployer/providers/1panel-site/1panel_site_test.go index 1d5bafef..91b1ebb0 100644 --- a/internal/pkg/core/deployer/providers/1panel-site/1panel_site_test.go +++ b/internal/pkg/core/deployer/providers/1panel-site/1panel_site_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiVersion string fApiKey string fWebsiteId int64 @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiVersion, argsPrefix+"APIVERSION", "v1", "") flag.StringVar(&fApiKey, argsPrefix+"APIKEY", "", "") flag.Int64Var(&fWebsiteId, argsPrefix+"WEBSITEID", 0, "") @@ -37,7 +37,7 @@ Shell command to run this test: go test -v ./1panel_site_test.go -args \ --CERTIMATE_DEPLOYER_1PANELSITE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_1PANELSITE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_1PANELSITE_APIURL="http://127.0.0.1:20410" \ + --CERTIMATE_DEPLOYER_1PANELSITE_SERVERURL="http://127.0.0.1:20410" \ --CERTIMATE_DEPLOYER_1PANELSITE_APIVERSION="v1" \ --CERTIMATE_DEPLOYER_1PANELSITE_APIKEY="your-api-key" \ --CERTIMATE_DEPLOYER_1PANELSITE_WEBSITEID="your-website-id" @@ -50,14 +50,14 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIVERSION: %v", fApiVersion), fmt.Sprintf("APIKEY: %v", fApiKey), fmt.Sprintf("WEBSITEID: %v", fWebsiteId), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiVersion: fApiVersion, ApiKey: fApiKey, AllowInsecureConnections: true, diff --git a/internal/pkg/core/deployer/providers/baotapanel-console/baotapanel_console.go b/internal/pkg/core/deployer/providers/baotapanel-console/baotapanel_console.go index b1a57a81..b5deb005 100644 --- a/internal/pkg/core/deployer/providers/baotapanel-console/baotapanel_console.go +++ b/internal/pkg/core/deployer/providers/baotapanel-console/baotapanel_console.go @@ -13,8 +13,8 @@ import ( ) type DeployerConfig struct { - // 宝塔面板地址。 - ApiUrl string `json:"apiUrl"` + // 宝塔面板服务地址。 + ServerUrl string `json:"serverUrl"` // 宝塔面板接口密钥。 ApiKey string `json:"apiKey"` // 是否允许不安全的连接。 @@ -36,7 +36,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiKey, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiKey, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/baotapanel-console/baotapanel_console_test.go b/internal/pkg/core/deployer/providers/baotapanel-console/baotapanel_console_test.go index 5f3845e4..2fd4cc5b 100644 --- a/internal/pkg/core/deployer/providers/baotapanel-console/baotapanel_console_test.go +++ b/internal/pkg/core/deployer/providers/baotapanel-console/baotapanel_console_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiKey string ) @@ -23,7 +23,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiKey, argsPrefix+"APIKEY", "", "") } @@ -33,7 +33,7 @@ Shell command to run this test: go test -v ./baotapanel_console_test.go -args \ --CERTIMATE_DEPLOYER_BAOTAPANELCONSOLE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_BAOTAPANELCONSOLE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_BAOTAPANELCONSOLE_APIURL="http://127.0.0.1:8888" \ + --CERTIMATE_DEPLOYER_BAOTAPANELCONSOLE_SERVERURL="http://127.0.0.1:8888" \ --CERTIMATE_DEPLOYER_BAOTAPANELCONSOLE_APIKEY="your-api-key" */ func TestDeploy(t *testing.T) { @@ -44,12 +44,12 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, AutoRestart: true, diff --git a/internal/pkg/core/deployer/providers/baotapanel-site/baotapanel_site.go b/internal/pkg/core/deployer/providers/baotapanel-site/baotapanel_site.go index 4d481f7f..f9936e2d 100644 --- a/internal/pkg/core/deployer/providers/baotapanel-site/baotapanel_site.go +++ b/internal/pkg/core/deployer/providers/baotapanel-site/baotapanel_site.go @@ -14,8 +14,8 @@ import ( ) type DeployerConfig struct { - // 宝塔面板地址。 - ApiUrl string `json:"apiUrl"` + // 宝塔面板服务地址。 + ServerUrl string `json:"serverUrl"` // 宝塔面板接口密钥。 ApiKey string `json:"apiKey"` // 是否允许不安全的连接。 @@ -41,7 +41,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiKey, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiKey, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/baotapanel-site/baotapanel_site_test.go b/internal/pkg/core/deployer/providers/baotapanel-site/baotapanel_site_test.go index 5fece978..9e4659ea 100644 --- a/internal/pkg/core/deployer/providers/baotapanel-site/baotapanel_site_test.go +++ b/internal/pkg/core/deployer/providers/baotapanel-site/baotapanel_site_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiKey string fSiteType string fSiteName string @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiKey, argsPrefix+"APIKEY", "", "") flag.StringVar(&fSiteType, argsPrefix+"SITETYPE", "", "") flag.StringVar(&fSiteName, argsPrefix+"SITENAME", "", "") @@ -37,7 +37,7 @@ Shell command to run this test: go test -v ./baotapanel_site_test.go -args \ --CERTIMATE_DEPLOYER_BAOTAPANELSITE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_BAOTAPANELSITE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_BAOTAPANELSITE_APIURL="http://127.0.0.1:8888" \ + --CERTIMATE_DEPLOYER_BAOTAPANELSITE_SERVERURL="http://127.0.0.1:8888" \ --CERTIMATE_DEPLOYER_BAOTAPANELSITE_APIKEY="your-api-key" \ --CERTIMATE_DEPLOYER_BAOTAPANELSITE_SITETYPE="php" \ --CERTIMATE_DEPLOYER_BAOTAPANELSITE_SITENAME="your-site-name" @@ -50,14 +50,14 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIKEY: %v", fApiKey), fmt.Sprintf("SITETYPE: %v", fSiteType), fmt.Sprintf("SITENAME: %v", fSiteName), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, SiteType: fSiteType, diff --git a/internal/pkg/core/deployer/providers/baotawaf-console/baotawaf_console.go b/internal/pkg/core/deployer/providers/baotawaf-console/baotawaf_console.go index 811b350b..bf8a3892 100644 --- a/internal/pkg/core/deployer/providers/baotawaf-console/baotawaf_console.go +++ b/internal/pkg/core/deployer/providers/baotawaf-console/baotawaf_console.go @@ -13,8 +13,8 @@ import ( ) type DeployerConfig struct { - // 堡塔云 WAF 地址。 - ApiUrl string `json:"apiUrl"` + // 堡塔云 WAF 服务地址。 + ServerUrl string `json:"serverUrl"` // 堡塔云 WAF 接口密钥。 ApiKey string `json:"apiKey"` // 是否允许不安全的连接。 @@ -34,7 +34,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiKey, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiKey, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/baotawaf-console/baotawaf_console_test.go b/internal/pkg/core/deployer/providers/baotawaf-console/baotawaf_console_test.go index ba6ddd26..b3804fb5 100644 --- a/internal/pkg/core/deployer/providers/baotawaf-console/baotawaf_console_test.go +++ b/internal/pkg/core/deployer/providers/baotawaf-console/baotawaf_console_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiKey string fSiteName string fSitePort int64 @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiKey, argsPrefix+"APIKEY", "", "") } @@ -35,7 +35,7 @@ Shell command to run this test: go test -v ./baotawaf_console_test.go -args \ --CERTIMATE_DEPLOYER_BAOTAWAFCONSOLE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_BAOTAWAFCONSOLE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_BAOTAWAFCONSOLE_APIURL="http://127.0.0.1:8888" \ + --CERTIMATE_DEPLOYER_BAOTAWAFCONSOLE_SERVERURL="http://127.0.0.1:8888" \ --CERTIMATE_DEPLOYER_BAOTAWAFCONSOLE_APIKEY="your-api-key" */ func TestDeploy(t *testing.T) { @@ -46,12 +46,12 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, }) diff --git a/internal/pkg/core/deployer/providers/baotawaf-site/baotawaf_site.go b/internal/pkg/core/deployer/providers/baotawaf-site/baotawaf_site.go index ed05937a..faaf5681 100644 --- a/internal/pkg/core/deployer/providers/baotawaf-site/baotawaf_site.go +++ b/internal/pkg/core/deployer/providers/baotawaf-site/baotawaf_site.go @@ -14,8 +14,8 @@ import ( ) type DeployerConfig struct { - // 堡塔云 WAF 地址。 - ApiUrl string `json:"apiUrl"` + // 堡塔云 WAF 服务地址。 + ServerUrl string `json:"serverUrl"` // 堡塔云 WAF 接口密钥。 ApiKey string `json:"apiKey"` // 是否允许不安全的连接。 @@ -40,7 +40,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiKey, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiKey, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/baotawaf-site/baotawaf_site_test.go b/internal/pkg/core/deployer/providers/baotawaf-site/baotawaf_site_test.go index 4e1ffe34..6bead4b5 100644 --- a/internal/pkg/core/deployer/providers/baotawaf-site/baotawaf_site_test.go +++ b/internal/pkg/core/deployer/providers/baotawaf-site/baotawaf_site_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiKey string fSiteName string fSitePort int64 @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiKey, argsPrefix+"APIKEY", "", "") flag.StringVar(&fSiteName, argsPrefix+"SITENAME", "", "") flag.Int64Var(&fSitePort, argsPrefix+"SITEPORT", 0, "") @@ -37,7 +37,7 @@ Shell command to run this test: go test -v ./baotawaf_site_test.go -args \ --CERTIMATE_DEPLOYER_BAOTAWAFSITE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_BAOTAWAFSITE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_BAOTAWAFSITE_APIURL="http://127.0.0.1:8888" \ + --CERTIMATE_DEPLOYER_BAOTAWAFSITE_SERVERURL="http://127.0.0.1:8888" \ --CERTIMATE_DEPLOYER_BAOTAWAFSITE_APIKEY="your-api-key" \ --CERTIMATE_DEPLOYER_BAOTAWAFSITE_SITENAME="your-site-name"\ --CERTIMATE_DEPLOYER_BAOTAWAFSITE_SITEPORT=443 @@ -50,14 +50,14 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIKEY: %v", fApiKey), fmt.Sprintf("SITENAME: %v", fSiteName), fmt.Sprintf("SITEPORT: %v", fSitePort), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, SiteName: fSiteName, diff --git a/internal/pkg/core/deployer/providers/cdnfly/cdnfly.go b/internal/pkg/core/deployer/providers/cdnfly/cdnfly.go index 909caf3e..6b7c3ec7 100644 --- a/internal/pkg/core/deployer/providers/cdnfly/cdnfly.go +++ b/internal/pkg/core/deployer/providers/cdnfly/cdnfly.go @@ -15,8 +15,8 @@ import ( ) type DeployerConfig struct { - // Cdnfly 地址。 - ApiUrl string `json:"apiUrl"` + // Cdnfly 服务地址。 + ServerUrl string `json:"serverUrl"` // Cdnfly 用户端 API Key。 ApiKey string `json:"apiKey"` // Cdnfly 用户端 API Secret。 @@ -46,7 +46,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiKey, config.ApiSecret, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiKey, config.ApiSecret, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/cdnfly/cdnfly_test.go b/internal/pkg/core/deployer/providers/cdnfly/cdnfly_test.go index 26486721..73128183 100644 --- a/internal/pkg/core/deployer/providers/cdnfly/cdnfly_test.go +++ b/internal/pkg/core/deployer/providers/cdnfly/cdnfly_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiKey string fApiSecret string fCertificateId string @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiKey, argsPrefix+"APIKEY", "", "") flag.StringVar(&fApiSecret, argsPrefix+"APISECRET", "", "") flag.StringVar(&fCertificateId, argsPrefix+"CERTIFICATEID", "", "") @@ -37,7 +37,7 @@ Shell command to run this test: go test -v ./cdnfly_test.go -args \ --CERTIMATE_DEPLOYER_CDNFLY_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_CDNFLY_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_CDNFLY_APIURL="http://127.0.0.1:88" \ + --CERTIMATE_DEPLOYER_CDNFLY_SERVERURL="http://127.0.0.1:88" \ --CERTIMATE_DEPLOYER_CDNFLY_APIKEY="your-api-key" \ --CERTIMATE_DEPLOYER_CDNFLY_APISECRET="your-api-secret" \ --CERTIMATE_DEPLOYER_CDNFLY_CERTIFICATEID="your-cert-id" @@ -50,14 +50,14 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIKEY: %v", fApiKey), fmt.Sprintf("APISECRET: %v", fApiSecret), fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiKey: fApiKey, ApiSecret: fApiSecret, AllowInsecureConnections: true, diff --git a/internal/pkg/core/deployer/providers/flexcdn/flexcdn.go b/internal/pkg/core/deployer/providers/flexcdn/flexcdn.go index a12ed164..7925a72a 100644 --- a/internal/pkg/core/deployer/providers/flexcdn/flexcdn.go +++ b/internal/pkg/core/deployer/providers/flexcdn/flexcdn.go @@ -16,8 +16,8 @@ import ( ) type DeployerConfig struct { - // FlexCDN URL。 - ApiUrl string `json:"apiUrl"` + // FlexCDN 服务地址。 + ServerUrl string `json:"serverUrl"` // FlexCDN 用户角色。 // 可取值 "user"、"admin"。 ApiRole string `json:"apiRole"` @@ -47,7 +47,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiRole, config.AccessKeyId, config.AccessKey, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiRole, config.AccessKeyId, config.AccessKey, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/flexcdn/flexcdn_test.go b/internal/pkg/core/deployer/providers/flexcdn/flexcdn_test.go index b9b8de07..6725140a 100644 --- a/internal/pkg/core/deployer/providers/flexcdn/flexcdn_test.go +++ b/internal/pkg/core/deployer/providers/flexcdn/flexcdn_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fAccessKeyId string fAccessKey string fCertificateId int64 @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fAccessKeyId, argsPrefix+"ACCESSKEYID", "", "") flag.StringVar(&fAccessKey, argsPrefix+"ACCESSKEY", "", "") flag.Int64Var(&fCertificateId, argsPrefix+"CERTIFICATEID", 0, "") @@ -37,7 +37,7 @@ Shell command to run this test: go test -v ./flexcdn_test.go -args \ --CERTIMATE_DEPLOYER_FLEXCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_FLEXCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_FLEXCDN_APIURL="http://127.0.0.1:7788" \ + --CERTIMATE_DEPLOYER_FLEXCDN_SERVERURL="http://127.0.0.1:7788" \ --CERTIMATE_DEPLOYER_FLEXCDN_ACCESSKEYID="your-access-key-id" \ --CERTIMATE_DEPLOYER_FLEXCDN_ACCESSKEY="your-access-key" \ --CERTIMATE_DEPLOYER_FLEXCDN_CERTIFICATEID="your-cerficiate-id" @@ -50,14 +50,14 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("ACCESSKEYID: %v", fAccessKeyId), fmt.Sprintf("ACCESSKEY: %v", fAccessKey), fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiRole: "user", AccessKeyId: fAccessKeyId, AccessKey: fAccessKey, diff --git a/internal/pkg/core/deployer/providers/goedge/goedge.go b/internal/pkg/core/deployer/providers/goedge/goedge.go index ecae774e..5b3e2dc9 100644 --- a/internal/pkg/core/deployer/providers/goedge/goedge.go +++ b/internal/pkg/core/deployer/providers/goedge/goedge.go @@ -16,8 +16,8 @@ import ( ) type DeployerConfig struct { - // GoEdge URL。 - ApiUrl string `json:"apiUrl"` + // GoEdge 服务地址。 + ServerUrl string `json:"serverUrl"` // GoEdge 用户角色。 // 可取值 "user"、"admin"。 ApiRole string `json:"apiRole"` @@ -47,7 +47,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiRole, config.AccessKeyId, config.AccessKey, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiRole, config.AccessKeyId, config.AccessKey, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/goedge/goedge_test.go b/internal/pkg/core/deployer/providers/goedge/goedge_test.go index d10f931c..ae03db1d 100644 --- a/internal/pkg/core/deployer/providers/goedge/goedge_test.go +++ b/internal/pkg/core/deployer/providers/goedge/goedge_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fAccessKeyId string fAccessKey string fCertificateId int64 @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fAccessKeyId, argsPrefix+"ACCESSKEYID", "", "") flag.StringVar(&fAccessKey, argsPrefix+"ACCESSKEY", "", "") flag.Int64Var(&fCertificateId, argsPrefix+"CERTIFICATEID", 0, "") @@ -37,7 +37,7 @@ Shell command to run this test: go test -v ./goedge_test.go -args \ --CERTIMATE_DEPLOYER_GOEDGE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_GOEDGE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_GOEDGE_APIURL="http://127.0.0.1:7788" \ + --CERTIMATE_DEPLOYER_GOEDGE_SERVERURL="http://127.0.0.1:7788" \ --CERTIMATE_DEPLOYER_GOEDGE_ACCESSKEYID="your-access-key-id" \ --CERTIMATE_DEPLOYER_GOEDGE_ACCESSKEY="your-access-key" \ --CERTIMATE_DEPLOYER_GOEDGE_CERTIFICATEID="your-cerficiate-id" @@ -50,14 +50,14 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("ACCESSKEYID: %v", fAccessKeyId), fmt.Sprintf("ACCESSKEY: %v", fAccessKey), fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiRole: "user", AccessKeyId: fAccessKeyId, AccessKey: fAccessKey, diff --git a/internal/pkg/core/deployer/providers/lecdn/lecdn.go b/internal/pkg/core/deployer/providers/lecdn/lecdn.go index 1ad88dcf..15c5dba9 100644 --- a/internal/pkg/core/deployer/providers/lecdn/lecdn.go +++ b/internal/pkg/core/deployer/providers/lecdn/lecdn.go @@ -15,8 +15,8 @@ import ( ) type DeployerConfig struct { - // LeCDN URL。 - ApiUrl string `json:"apiUrl"` + // LeCDN 服务地址。 + ServerUrl string `json:"serverUrl"` // LeCDN 版本。 // 可取值 "v3"。 ApiVersion string `json:"apiVersion"` @@ -59,7 +59,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiVersion, config.ApiRole, config.Username, config.Password, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiVersion, config.ApiRole, config.Username, config.Password, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/lecdn/lecdn_test.go b/internal/pkg/core/deployer/providers/lecdn/lecdn_test.go index cbaa4523..fda880c4 100644 --- a/internal/pkg/core/deployer/providers/lecdn/lecdn_test.go +++ b/internal/pkg/core/deployer/providers/lecdn/lecdn_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiVersion string fUsername string fPassword string @@ -26,7 +26,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiVersion, argsPrefix+"APIVERSION", "v3", "") flag.StringVar(&fUsername, argsPrefix+"USERNAME", "", "") flag.StringVar(&fPassword, argsPrefix+"PASSWORD", "", "") @@ -39,7 +39,7 @@ Shell command to run this test: go test -v ./lecdn_test.go -args \ --CERTIMATE_DEPLOYER_LECDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_LECDN_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_LECDN_APIURL="http://127.0.0.1:5090" \ + --CERTIMATE_DEPLOYER_LECDN_SERVERURL="http://127.0.0.1:5090" \ --CERTIMATE_DEPLOYER_LECDN_USERNAME="your-username" \ --CERTIMATE_DEPLOYER_LECDN_PASSWORD="your-password" \ --CERTIMATE_DEPLOYER_LECDN_CERTIFICATEID="your-cerficiate-id" @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIVERSION: %v", fApiVersion), fmt.Sprintf("USERNAME: %v", fUsername), fmt.Sprintf("PASSWORD: %v", fPassword), @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiVersion: fApiVersion, ApiRole: "user", Username: fUsername, diff --git a/internal/pkg/core/deployer/providers/proxmoxve/proxmoxve.go b/internal/pkg/core/deployer/providers/proxmoxve/proxmoxve.go index d2e92460..455ccf6d 100644 --- a/internal/pkg/core/deployer/providers/proxmoxve/proxmoxve.go +++ b/internal/pkg/core/deployer/providers/proxmoxve/proxmoxve.go @@ -16,8 +16,8 @@ import ( ) type DeployerConfig struct { - // Proxmox VE 地址。 - ApiUrl string `json:"apiUrl"` + // Proxmox VE 服务地址。 + ServerUrl string `json:"serverUrl"` // Proxmox VE API Token。 ApiToken string `json:"apiToken"` // Proxmox VE API Token Secret。 @@ -43,7 +43,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiToken, config.ApiTokenSecret, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiToken, config.ApiTokenSecret, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/proxmoxve/proxmoxve_test.go b/internal/pkg/core/deployer/providers/proxmoxve/proxmoxve_test.go index 6251bd75..8ae02f3b 100644 --- a/internal/pkg/core/deployer/providers/proxmoxve/proxmoxve_test.go +++ b/internal/pkg/core/deployer/providers/proxmoxve/proxmoxve_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiToken string fApiTokenSecret string fNodeName string @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiToken, argsPrefix+"APITOKEN", "", "") flag.StringVar(&fApiTokenSecret, argsPrefix+"APITOKENSECRET", "", "") flag.StringVar(&fNodeName, argsPrefix+"NODENAME", "", "") @@ -37,7 +37,7 @@ Shell command to run this test: go test -v ./proxmoxve_test.go -args \ --CERTIMATE_DEPLOYER_PROXMOXVE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_PROXMOXVE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_PROXMOXVE_APIURL="http://127.0.0.1:8006" \ + --CERTIMATE_DEPLOYER_PROXMOXVE_SERVERURL="http://127.0.0.1:8006" \ --CERTIMATE_DEPLOYER_PROXMOXVE_APITOKEN="your-api-token" \ --CERTIMATE_DEPLOYER_PROXMOXVE_APITOKENSECRET="your-api-token-secret" \ --CERTIMATE_DEPLOYER_PROXMOXVE_NODENAME="your-cluster-node-name" @@ -50,14 +50,14 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APITOKEN: %v", fApiToken), fmt.Sprintf("APITOKENSECRET: %v", fApiTokenSecret), fmt.Sprintf("NODENAME: %v", fNodeName), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiToken: fApiToken, ApiTokenSecret: fApiTokenSecret, AllowInsecureConnections: true, diff --git a/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console.go b/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console.go index 51faf4f2..a6c560ae 100644 --- a/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console.go +++ b/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console.go @@ -13,8 +13,8 @@ import ( ) type DeployerConfig struct { - // 耗子面板地址。 - ApiUrl string `json:"apiUrl"` + // 耗子面板服务地址。 + ServerUrl string `json:"serverUrl"` // 耗子面板访问令牌 ID。 AccessTokenId int32 `json:"accessTokenId"` // 耗子面板访问令牌。 @@ -36,7 +36,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.AccessTokenId, config.AccessToken, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.AccessTokenId, config.AccessToken, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go b/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go index 3f3193b3..3366b06c 100644 --- a/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go +++ b/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fAccessTokenId int64 fAccessToken string ) @@ -24,7 +24,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.Int64Var(&fAccessTokenId, argsPrefix+"ACCESSTOKENID", 0, "") flag.StringVar(&fAccessToken, argsPrefix+"ACCESSTOKEN", "", "") } @@ -35,7 +35,7 @@ Shell command to run this test: go test -v ./ratpanel_console_test.go -args \ --CERTIMATE_DEPLOYER_RATPANELCONSOLE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_RATPANELCONSOLE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_RATPANELCONSOLE_APIURL="http://127.0.0.1:8888" \ + --CERTIMATE_DEPLOYER_RATPANELCONSOLE_SERVERURL="http://127.0.0.1:8888" \ --CERTIMATE_DEPLOYER_RATPANELCONSOLE_ACCESSTOKENID="your-access-token-id" \ --CERTIMATE_DEPLOYER_RATPANELCONSOLE_ACCESSTOKEN="your-access-token" */ @@ -47,13 +47,13 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("ACCESSTOKENID: %v", fAccessTokenId), fmt.Sprintf("ACCESSTOKEN: %v", fAccessToken), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, AccessTokenId: int32(fAccessTokenId), AccessToken: fAccessToken, AllowInsecureConnections: true, diff --git a/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site.go b/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site.go index b4e283be..a296c95e 100644 --- a/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site.go +++ b/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site.go @@ -13,8 +13,8 @@ import ( ) type DeployerConfig struct { - // 耗子面板地址。 - ApiUrl string `json:"apiUrl"` + // 耗子面板服务地址。 + ServerUrl string `json:"serverUrl"` // 耗子面板访问令牌 ID。 AccessTokenId int32 `json:"accessTokenId"` // 耗子面板访问令牌。 @@ -38,7 +38,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.AccessTokenId, config.AccessToken, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.AccessTokenId, config.AccessToken, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go b/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go index 658175fb..cd84b3ea 100644 --- a/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go +++ b/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fAccessTokenId int64 fAccessToken string fSiteName string @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.Int64Var(&fAccessTokenId, argsPrefix+"ACCESSTOKENID", 0, "") flag.StringVar(&fAccessToken, argsPrefix+"ACCESSTOKEN", "", "") flag.StringVar(&fSiteName, argsPrefix+"SITENAME", "", "") @@ -37,7 +37,7 @@ Shell command to run this test: go test -v ./ratpanel_site_test.go -args \ --CERTIMATE_DEPLOYER_RATPANELSITE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_RATPANELSITE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_RATPANELSITE_APIURL="http://127.0.0.1:8888" \ + --CERTIMATE_DEPLOYER_RATPANELSITE_SERVERURL="http://127.0.0.1:8888" \ --CERTIMATE_DEPLOYER_RATPANELSITE_ACCESSTOKENID="your-access-token-id" \ --CERTIMATE_DEPLOYER_RATPANELSITE_ACCESSTOKEN="your-access-token" \ --CERTIMATE_DEPLOYER_RATPANELSITE_SITENAME="your-site-name" @@ -50,14 +50,14 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("ACCESSTOKENID: %v", fAccessTokenId), fmt.Sprintf("ACCESSTOKEN: %v", fAccessToken), fmt.Sprintf("SITENAME: %v", fSiteName), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, AccessTokenId: int32(fAccessTokenId), AccessToken: fAccessToken, AllowInsecureConnections: true, diff --git a/internal/pkg/core/deployer/providers/safeline/safeline.go b/internal/pkg/core/deployer/providers/safeline/safeline.go index f737fda9..0abee743 100644 --- a/internal/pkg/core/deployer/providers/safeline/safeline.go +++ b/internal/pkg/core/deployer/providers/safeline/safeline.go @@ -13,8 +13,8 @@ import ( ) type DeployerConfig struct { - // 雷池 URL。 - ApiUrl string `json:"apiUrl"` + // 雷池服务地址。 + ServerUrl string `json:"serverUrl"` // 雷池 API Token。 ApiToken string `json:"apiToken"` // 是否允许不安全的连接。 @@ -39,7 +39,7 @@ func NewDeployer(config *DeployerConfig) (*DeployerProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiToken, config.AllowInsecureConnections) + client, err := createSdkClient(config.ServerUrl, config.ApiToken, config.AllowInsecureConnections) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/deployer/providers/safeline/safeline_test.go b/internal/pkg/core/deployer/providers/safeline/safeline_test.go index 67fe6755..9730473c 100644 --- a/internal/pkg/core/deployer/providers/safeline/safeline_test.go +++ b/internal/pkg/core/deployer/providers/safeline/safeline_test.go @@ -14,7 +14,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiToken string fCertificateId int64 ) @@ -24,7 +24,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiToken, argsPrefix+"APITOKEN", "", "") flag.Int64Var(&fCertificateId, argsPrefix+"CERTIFICATEID", 0, "") } @@ -35,7 +35,7 @@ Shell command to run this test: go test -v ./safeline_test.go -args \ --CERTIMATE_DEPLOYER_SAFELINE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_SAFELINE_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_DEPLOYER_SAFELINE_APIURL="http://127.0.0.1:9443" \ + --CERTIMATE_DEPLOYER_SAFELINE_SERVERURL="http://127.0.0.1:9443" \ --CERTIMATE_DEPLOYER_SAFELINE_APITOKEN="your-api-token" \ --CERTIMATE_DEPLOYER_SAFELINE_CERTIFICATEID="your-cerficiate-id" */ @@ -47,13 +47,13 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APITOKEN: %v", fApiToken), fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) deployer, err := provider.NewDeployer(&provider.DeployerConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiToken: fApiToken, AllowInsecureConnections: true, ResourceType: provider.RESOURCE_TYPE_CERTIFICATE, diff --git a/internal/pkg/core/notifier/providers/mattermost/mattermost.go b/internal/pkg/core/notifier/providers/mattermost/mattermost.go index a9b2f4d6..8e4fb24d 100644 --- a/internal/pkg/core/notifier/providers/mattermost/mattermost.go +++ b/internal/pkg/core/notifier/providers/mattermost/mattermost.go @@ -12,13 +12,13 @@ import ( ) type NotifierConfig struct { - // 服务地址。 + // Mattermost 服务地址。 ServerUrl string `json:"serverUrl"` - // 用户名。 + // Mattermost 用户名。 Username string `json:"username"` - // 密码。 + // Mattermost 密码。 Password string `json:"password"` - // 频道 ID。 + // Mattermost 频道 ID。 ChannelId string `json:"channelId"` } diff --git a/internal/pkg/core/uploader/providers/1panel-ssl/1panel_ssl.go b/internal/pkg/core/uploader/providers/1panel-ssl/1panel_ssl.go index 63900125..387944e3 100644 --- a/internal/pkg/core/uploader/providers/1panel-ssl/1panel_ssl.go +++ b/internal/pkg/core/uploader/providers/1panel-ssl/1panel_ssl.go @@ -14,8 +14,8 @@ import ( ) type UploaderConfig struct { - // 1Panel 地址。 - ApiUrl string `json:"apiUrl"` + // 1Panel 服务地址。 + ServerUrl string `json:"serverUrl"` // 1Panel 版本。 ApiVersion string `json:"apiVersion"` // 1Panel 接口密钥。 @@ -35,7 +35,7 @@ func NewUploader(config *UploaderConfig) (*UploaderProvider, error) { panic("config is nil") } - client, err := createSdkClient(config.ApiUrl, config.ApiVersion, config.ApiKey) + client, err := createSdkClient(config.ServerUrl, config.ApiVersion, config.ApiKey) if err != nil { return nil, fmt.Errorf("failed to create sdk client: %w", err) } diff --git a/internal/pkg/core/uploader/providers/1panel-ssl/1panel_ssl_test.go b/internal/pkg/core/uploader/providers/1panel-ssl/1panel_ssl_test.go index cfb250be..d0af7c12 100644 --- a/internal/pkg/core/uploader/providers/1panel-ssl/1panel_ssl_test.go +++ b/internal/pkg/core/uploader/providers/1panel-ssl/1panel_ssl_test.go @@ -15,7 +15,7 @@ import ( var ( fInputCertPath string fInputKeyPath string - fApiUrl string + fServerUrl string fApiVersion string fApiKey string ) @@ -25,7 +25,7 @@ func init() { flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "") flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "") - flag.StringVar(&fApiUrl, argsPrefix+"APIURL", "", "") + flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "") flag.StringVar(&fApiVersion, argsPrefix+"APIVERSION", "v1", "") flag.StringVar(&fApiKey, argsPrefix+"APIKEY", "", "") } @@ -36,7 +36,7 @@ Shell command to run this test: go test -v ./1panel_ssl_test.go -args \ --CERTIMATE_UPLOADER_1PANELSSL_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_UPLOADER_1PANELSSL_INPUTKEYPATH="/path/to/your-input-key.pem" \ - --CERTIMATE_UPLOADER_1PANELSSL_APIURL="http://127.0.0.1:20410" \ + --CERTIMATE_UPLOADER_1PANELSSL_SERVERURL="http://127.0.0.1:20410" \ --CERTIMATE_UPLOADER_1PANELSSL_APIVERSION="v1" \ --CERTIMATE_UPLOADER_1PANELSSL_APIKEY="your-api-key" */ @@ -48,13 +48,13 @@ func TestDeploy(t *testing.T) { "args:", fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath), fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath), - fmt.Sprintf("APIURL: %v", fApiUrl), + fmt.Sprintf("SERVERURL: %v", fServerUrl), fmt.Sprintf("APIVERSION: %v", fApiVersion), fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) uploader, err := provider.NewUploader(&provider.UploaderConfig{ - ApiUrl: fApiUrl, + ServerUrl: fServerUrl, ApiVersion: fApiVersion, ApiKey: fApiKey, }) diff --git a/migrations/1748178000_upgrade.go b/migrations/1748178000_upgrade.go new file mode 100644 index 00000000..719ed64f --- /dev/null +++ b/migrations/1748178000_upgrade.go @@ -0,0 +1,60 @@ +package migrations + +import ( + "slices" + + "github.com/pocketbase/pocketbase/core" + m "github.com/pocketbase/pocketbase/migrations" +) + +func init() { + m.Register(func(app core.App) error { + // migrate data + { + accesses, err := app.FindAllRecords("access") + if err != nil { + return err + } + + providersToUpdate := []string{ + "1panel", + "baotapanel", + "baotawaf", + "cdnfly", + "flexcdn", + "goedge", + "lecdn", + "powerdns", + "proxmoxve", + "ratpanel", + "safeline", + } + for _, access := range accesses { + changed := false + + if slices.Contains(providersToUpdate, access.GetString("provider")) { + config := make(map[string]any) + if err := access.UnmarshalJSONField("config", &config); err != nil { + return err + } + + config["serverUrl"] = config["apiUrl"] + delete(config, "apiUrl") + access.Set("config", config) + changed = true + } + + if changed { + err = app.Save(access) + if err != nil { + return err + } + } + } + } + + return nil + }, func(app core.App) error { + return nil + }) +} diff --git a/ui/src/components/access/AccessForm1PanelConfig.tsx b/ui/src/components/access/AccessForm1PanelConfig.tsx index 29481f15..56792a02 100644 --- a/ui/src/components/access/AccessForm1PanelConfig.tsx +++ b/ui/src/components/access/AccessForm1PanelConfig.tsx @@ -17,7 +17,7 @@ export type AccessForm1PanelConfigProps = { const initFormModel = (): AccessForm1PanelConfigFieldValues => { return { - apiUrl: "http://:20410/", + serverUrl: "http://:20410/", apiVersion: "v1", apiKey: "", }; @@ -27,7 +27,7 @@ const AccessForm1PanelConfig = ({ form: formInst, formName, disabled, initialVal const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), apiVersion: z.string().nonempty(t("access.form.1panel_api_version.placeholder")), apiKey: z .string() @@ -51,8 +51,8 @@ const AccessForm1PanelConfig = ({ form: formInst, formName, disabled, initialVal name={formName} onValuesChange={handleFormChange} > - - + + @@ -68,10 +68,10 @@ const AccessForm1PanelConfig = ({ form: formInst, formName, disabled, initialVal - + diff --git a/ui/src/components/access/AccessFormBaotaPanelConfig.tsx b/ui/src/components/access/AccessFormBaotaPanelConfig.tsx index dd355b5e..d9cc2752 100644 --- a/ui/src/components/access/AccessFormBaotaPanelConfig.tsx +++ b/ui/src/components/access/AccessFormBaotaPanelConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormBaotaPanelConfigProps = { const initFormModel = (): AccessFormBaotaPanelConfigFieldValues => { return { - apiUrl: "http://:8888/", + serverUrl: "http://:8888/", apiKey: "", }; }; @@ -26,7 +26,7 @@ const AccessFormBaotaPanelConfig = ({ form: formInst, formName, disabled, initia const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), apiKey: z.string().nonempty(t("access.form.baotapanel_api_key.placeholder")).trim(), allowInsecureConnections: z.boolean().nullish(), }); @@ -45,8 +45,8 @@ const AccessFormBaotaPanelConfig = ({ form: formInst, formName, disabled, initia name={formName} onValuesChange={handleFormChange} > - - + + - + diff --git a/ui/src/components/access/AccessFormBaotaWAFConfig.tsx b/ui/src/components/access/AccessFormBaotaWAFConfig.tsx index e87ed596..edf18642 100644 --- a/ui/src/components/access/AccessFormBaotaWAFConfig.tsx +++ b/ui/src/components/access/AccessFormBaotaWAFConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormBaotaWAFConfigProps = { const initFormModel = (): AccessFormBaotaWAFConfigFieldValues => { return { - apiUrl: "http://:8379/", + serverUrl: "http://:8379/", apiKey: "", }; }; @@ -26,7 +26,7 @@ const AccessFormBaotaWAFConfig = ({ form: formInst, formName, disabled, initialV const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), apiKey: z.string().nonempty(t("access.form.baotawaf_api_key.placeholder")).trim(), allowInsecureConnections: z.boolean().nullish(), }); @@ -45,8 +45,8 @@ const AccessFormBaotaWAFConfig = ({ form: formInst, formName, disabled, initialV name={formName} onValuesChange={handleFormChange} > - - + + - + diff --git a/ui/src/components/access/AccessFormCdnflyConfig.tsx b/ui/src/components/access/AccessFormCdnflyConfig.tsx index e95e230b..10422c3b 100644 --- a/ui/src/components/access/AccessFormCdnflyConfig.tsx +++ b/ui/src/components/access/AccessFormCdnflyConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormCdnflyConfigProps = { const initFormModel = (): AccessFormCdnflyConfigFieldValues => { return { - apiUrl: "http://:88/", + serverUrl: "http://:88/", apiKey: "", apiSecret: "", }; @@ -27,7 +27,7 @@ const AccessFormCdnflyConfig = ({ form: formInst, formName, disabled, initialVal const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), apiKey: z .string() .min(1, t("access.form.cdnfly_api_key.placeholder")) @@ -55,8 +55,8 @@ const AccessFormCdnflyConfig = ({ form: formInst, formName, disabled, initialVal name={formName} onValuesChange={handleFormChange} > - - + + - + diff --git a/ui/src/components/access/AccessFormFlexCDNConfig.tsx b/ui/src/components/access/AccessFormFlexCDNConfig.tsx index 6ca020bf..71aa9607 100644 --- a/ui/src/components/access/AccessFormFlexCDNConfig.tsx +++ b/ui/src/components/access/AccessFormFlexCDNConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormFlexCDNConfigProps = { const initFormModel = (): AccessFormFlexCDNConfigFieldValues => { return { - apiUrl: "http://:8000/", + serverUrl: "http://:8000/", apiRole: "user", accessKeyId: "", accessKey: "", @@ -28,7 +28,7 @@ const AccessFormFlexCDNConfig = ({ form: formInst, formName, disabled, initialVa const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), role: z.union([z.literal("user"), z.literal("admin")], { message: t("access.form.flexcdn_api_role.placeholder"), }), @@ -51,8 +51,8 @@ const AccessFormFlexCDNConfig = ({ form: formInst, formName, disabled, initialVa name={formName} onValuesChange={handleFormChange} > - - + + @@ -77,10 +77,10 @@ const AccessFormFlexCDNConfig = ({ form: formInst, formName, disabled, initialVa - + diff --git a/ui/src/components/access/AccessFormGoEdgeConfig.tsx b/ui/src/components/access/AccessFormGoEdgeConfig.tsx index 9c03f2be..641e2276 100644 --- a/ui/src/components/access/AccessFormGoEdgeConfig.tsx +++ b/ui/src/components/access/AccessFormGoEdgeConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormGoEdgeConfigProps = { const initFormModel = (): AccessFormGoEdgeConfigFieldValues => { return { - apiUrl: "http://:7788/", + serverUrl: "http://:7788/", apiRole: "user", accessKeyId: "", accessKey: "", @@ -28,7 +28,7 @@ const AccessFormGoEdgeConfig = ({ form: formInst, formName, disabled, initialVal const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), role: z.union([z.literal("user"), z.literal("admin")], { message: t("access.form.goedge_api_role.placeholder"), }), @@ -51,8 +51,8 @@ const AccessFormGoEdgeConfig = ({ form: formInst, formName, disabled, initialVal name={formName} onValuesChange={handleFormChange} > - - + + @@ -77,10 +77,10 @@ const AccessFormGoEdgeConfig = ({ form: formInst, formName, disabled, initialVal - + diff --git a/ui/src/components/access/AccessFormLeCDNConfig.tsx b/ui/src/components/access/AccessFormLeCDNConfig.tsx index 4af5a639..282afa8d 100644 --- a/ui/src/components/access/AccessFormLeCDNConfig.tsx +++ b/ui/src/components/access/AccessFormLeCDNConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormLeCDNConfigProps = { const initFormModel = (): AccessFormLeCDNConfigFieldValues => { return { - apiUrl: "http://:5090/", + serverUrl: "http://:5090/", apiVersion: "v3", apiRole: "user", username: "", @@ -29,7 +29,7 @@ const AccessFormLeCDNConfig = ({ form: formInst, formName, disabled, initialValu const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), role: z.union([z.literal("client"), z.literal("master")], { message: t("access.form.lecdn_api_role.placeholder"), }), @@ -52,8 +52,8 @@ const AccessFormLeCDNConfig = ({ form: formInst, formName, disabled, initialValu name={formName} onValuesChange={handleFormChange} > - - + + @@ -72,10 +72,10 @@ const AccessFormLeCDNConfig = ({ form: formInst, formName, disabled, initialValu - + diff --git a/ui/src/components/access/AccessFormPowerDNSConfig.tsx b/ui/src/components/access/AccessFormPowerDNSConfig.tsx index b2bfb081..33447cc8 100644 --- a/ui/src/components/access/AccessFormPowerDNSConfig.tsx +++ b/ui/src/components/access/AccessFormPowerDNSConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormPowerDNSConfigProps = { const initFormModel = (): AccessFormPowerDNSConfigFieldValues => { return { - apiUrl: "http://:8082/", + serverUrl: "http://:8082/", apiKey: "", }; }; @@ -26,7 +26,7 @@ const AccessFormPowerDNSConfig = ({ form: formInst, formName, disabled, initialV const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), apiKey: z .string() .min(1, t("access.form.powerdns_api_key.placeholder")) @@ -49,8 +49,8 @@ const AccessFormPowerDNSConfig = ({ form: formInst, formName, disabled, initialV name={formName} onValuesChange={handleFormChange} > - - + + - + diff --git a/ui/src/components/access/AccessFormProxmoxVEConfig.tsx b/ui/src/components/access/AccessFormProxmoxVEConfig.tsx index d0a66745..29280b1c 100644 --- a/ui/src/components/access/AccessFormProxmoxVEConfig.tsx +++ b/ui/src/components/access/AccessFormProxmoxVEConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormProxmoxVEConfigProps = { const initFormModel = (): AccessFormProxmoxVEConfigFieldValues => { return { - apiUrl: "http://:8006/", + serverUrl: "http://:8006/", apiToken: "", }; }; @@ -26,7 +26,7 @@ const AccessFormProxmoxVEConfig = ({ form: formInst, formName, disabled, initial const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), apiToken: z.string().nonempty(t("access.form.proxmoxve_api_token.placeholder")).trim(), apiTokenSecret: z.string().nullish(), allowInsecureConnections: z.boolean().nullish(), @@ -46,8 +46,8 @@ const AccessFormProxmoxVEConfig = ({ form: formInst, formName, disabled, initial name={formName} onValuesChange={handleFormChange} > - - + + - + diff --git a/ui/src/components/access/AccessFormRatPanelConfig.tsx b/ui/src/components/access/AccessFormRatPanelConfig.tsx index ca3d2182..04a71cd1 100644 --- a/ui/src/components/access/AccessFormRatPanelConfig.tsx +++ b/ui/src/components/access/AccessFormRatPanelConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormRatPanelConfigProps = { const initFormModel = (): AccessFormRatPanelConfigFieldValues => { return { - apiUrl: "http://:8888/", + serverUrl: "http://:8888/", accessTokenId: 1, accessToken: "", }; @@ -27,7 +27,7 @@ const AccessFormRatPanelConfig = ({ form: formInst, formName, disabled, initialV const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), accessTokenId: z.preprocess((v) => Number(v), z.number().positive(t("access.form.ratpanel_access_token_id.placeholder"))), accessToken: z.string().nonempty(t("access.form.ratpanel_access_token.placeholder")).trim(), allowInsecureConnections: z.boolean().nullish(), @@ -47,8 +47,8 @@ const AccessFormRatPanelConfig = ({ form: formInst, formName, disabled, initialV name={formName} onValuesChange={handleFormChange} > - - + + - + diff --git a/ui/src/components/access/AccessFormSafeLineConfig.tsx b/ui/src/components/access/AccessFormSafeLineConfig.tsx index 2fde089d..c698d066 100644 --- a/ui/src/components/access/AccessFormSafeLineConfig.tsx +++ b/ui/src/components/access/AccessFormSafeLineConfig.tsx @@ -17,7 +17,7 @@ export type AccessFormSafeLineConfigProps = { const initFormModel = (): AccessFormSafeLineConfigFieldValues => { return { - apiUrl: "http://:9443/", + serverUrl: "http://:9443/", apiToken: "", }; }; @@ -26,7 +26,7 @@ const AccessFormSafeLineConfig = ({ form: formInst, formName, disabled, initialV const { t } = useTranslation(); const formSchema = z.object({ - apiUrl: z.string().url(t("common.errmsg.url_invalid")), + serverUrl: z.string().url(t("common.errmsg.url_invalid")), apiToken: z .string() .min(1, t("access.form.safeline_api_token.placeholder")) @@ -49,8 +49,8 @@ const AccessFormSafeLineConfig = ({ form: formInst, formName, disabled, initialV name={formName} onValuesChange={handleFormChange} > - - + + - + diff --git a/ui/src/components/access/AccessFormWebhookConfig.tsx b/ui/src/components/access/AccessFormWebhookConfig.tsx index 6e6ec87a..d79f848d 100644 --- a/ui/src/components/access/AccessFormWebhookConfig.tsx +++ b/ui/src/components/access/AccessFormWebhookConfig.tsx @@ -362,10 +362,10 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa - + diff --git a/ui/src/components/workflow/node/_SharedNode.tsx b/ui/src/components/workflow/node/_SharedNode.tsx index 510a0154..7bec1e90 100644 --- a/ui/src/components/workflow/node/_SharedNode.tsx +++ b/ui/src/components/workflow/node/_SharedNode.tsx @@ -1,13 +1,14 @@ -import { memo, useRef } from "react"; +import { memo, useMemo, useRef } from "react"; import { useTranslation } from "react-i18next"; import { CloseCircleOutlined as CloseCircleOutlinedIcon, EllipsisOutlined as EllipsisOutlinedIcon, FormOutlined as FormOutlinedIcon, + MergeOutlined as MergeOutlinedIcon, MoreOutlined as MoreOutlinedIcon, } from "@ant-design/icons"; import { useControllableValue } from "ahooks"; -import { Button, Card, Drawer, Dropdown, Input, type InputRef, Modal, Popover, Space } from "antd"; +import { Button, Card, Drawer, Dropdown, Input, type InputRef, type MenuProps, Modal, Popover, Space } from "antd"; import { produce } from "immer"; import { isEqual } from "radash"; @@ -59,12 +60,13 @@ const SharedNodeTitle = ({ className, style, node, disabled }: SharedNodeTitlePr type SharedNodeMenuProps = SharedNodeProps & { branchId?: string; branchIndex?: number; + menus?: Array<"rename" | "duplicate" | "remove">; trigger: React.ReactNode; afterUpdate?: () => void; afterDelete?: () => void; }; -const isBranchingNode = (node: WorkflowNode) => { +const isNodeBranchLike = (node: WorkflowNode) => { return ( node.type === WorkflowNodeType.Branch || node.type === WorkflowNodeType.Condition || @@ -74,7 +76,11 @@ const isBranchingNode = (node: WorkflowNode) => { ); }; -const SharedNodeMenu = ({ trigger, node, disabled, branchId, branchIndex, afterUpdate, afterDelete }: SharedNodeMenuProps) => { +const isNodeReadOnly = (node: WorkflowNode) => { + return node.type === WorkflowNodeType.Start || node.type === WorkflowNodeType.End; +}; + +const SharedNodeMenu = ({ menus, trigger, node, disabled, branchId, branchIndex, afterUpdate, afterDelete }: SharedNodeMenuProps) => { const { t } = useTranslation(); const { updateNode, removeNode, removeBranch } = useWorkflowStore(useZustandShallowSelector(["updateNode", "removeNode", "removeBranch"])); @@ -101,7 +107,7 @@ const SharedNodeMenu = ({ trigger, node, disabled, branchId, branchIndex, afterU }; const handleDeleteClick = async () => { - if (isBranchingNode(node)) { + if (isNodeBranchLike(node)) { await removeBranch(branchId!, branchIndex!); } else { await removeNode(node.id); @@ -110,56 +116,82 @@ const SharedNodeMenu = ({ trigger, node, disabled, branchId, branchIndex, afterU afterDelete?.(); }; + const menuItems = useMemo(() => { + let temp = [ + { + key: "rename", + disabled: disabled, + label: isNodeBranchLike(node) ? t("workflow_node.action.rename_branch") : t("workflow_node.action.rename_node"), + icon: , + onClick: () => { + nameRef.current = node.name; + + const dialog = modalApi.confirm({ + title: isNodeBranchLike(node) ? t("workflow_node.action.rename_branch") : t("workflow_node.action.rename_node"), + content: ( +
+ (nameRef.current = e.target.value)} + onPressEnter={async () => { + await handleRenameConfirm(); + dialog.destroy(); + }} + /> +
+ ), + icon: null, + okText: t("common.button.save"), + onOk: handleRenameConfirm, + }); + setTimeout(() => nameInputRef.current?.focus(), 1); + }, + }, + // { + // key: "duplicate", + // disabled: disabled || isNodeReadOnly(node), + // label: isNodeBranchLike(node) ? t("workflow_node.action.duplicate_branch") : t("workflow_node.action.duplicate_node"), + // icon: , + // }, + { + type: "divider", + }, + { + key: "remove", + disabled: disabled || isNodeReadOnly(node), + label: isNodeBranchLike(node) ? t("workflow_node.action.remove_branch") : t("workflow_node.action.remove_node"), + icon: , + danger: true, + onClick: handleDeleteClick, + }, + ] satisfies MenuProps["items"]; + + if (menus) { + temp = temp.filter((item) => item.type === "divider" || menus.includes(item.key as "rename" | "remove")); + temp = temp.filter((item, index, array) => { + if (item.type !== "divider") return true; + return index === 0 || array[index - 1].type !== "divider"; + }); + if (temp[0]?.type === "divider") { + temp.shift(); + } + if (temp[temp.length - 1]?.type === "divider") { + temp.pop(); + } + } + + return temp; + }, [disabled, node]); + return ( <> {ModelContextHolder} , - onClick: () => { - nameRef.current = node.name; - - const dialog = modalApi.confirm({ - title: isBranchingNode(node) ? t("workflow_node.action.rename_branch") : t("workflow_node.action.rename_node"), - content: ( -
- (nameRef.current = e.target.value)} - onPressEnter={async () => { - await handleRenameConfirm(); - dialog.destroy(); - }} - /> -
- ), - icon: null, - okText: t("common.button.save"), - onOk: handleRenameConfirm, - }); - setTimeout(() => nameInputRef.current?.focus(), 1); - }, - }, - { - type: "divider", - }, - { - key: "remove", - disabled: disabled || node.type === WorkflowNodeType.Start, - label: isBranchingNode(node) ? t("workflow_node.action.remove_branch") : t("workflow_node.action.remove_node"), - icon: , - danger: true, - onClick: handleDeleteClick, - }, - ], + items: menuItems, }} trigger={["click"]} > @@ -264,7 +296,6 @@ const SharedNodeConfigDrawer = ({ const { promise, resolve, reject } = Promise.withResolvers(); if (changed) { - console.log(oldValues, newValues); modalApi.confirm({ title: t("common.text.operation_confirm"), content: t("workflow_node.unsaved_changes.confirm"), @@ -288,6 +319,7 @@ const SharedNodeConfigDrawer = ({ destroyOnHidden extra={ } type="text" />} diff --git a/ui/src/domain/access.ts b/ui/src/domain/access.ts index f60f39c8..3765310a 100644 --- a/ui/src/domain/access.ts +++ b/ui/src/domain/access.ts @@ -73,7 +73,7 @@ export interface AccessModel extends BaseModel { // #region AccessConfig export type AccessConfigFor1Panel = { - apiUrl: string; + serverUrl: string; apiVersion: string; apiKey: string; allowInsecureConnections?: boolean; @@ -119,13 +119,13 @@ export type AccessConfigForBaishan = { }; export type AccessConfigForBaotaPanel = { - apiUrl: string; + serverUrl: string; apiKey: string; allowInsecureConnections?: boolean; }; export type AccessConfigForBaotaWAF = { - apiUrl: string; + serverUrl: string; apiKey: string; allowInsecureConnections?: boolean; }; @@ -144,7 +144,7 @@ export type AccessConfigForCacheFly = { }; export type AccessConfigForCdnfly = { - apiUrl: string; + serverUrl: string; apiKey: string; apiSecret: string; allowInsecureConnections?: boolean; @@ -204,7 +204,7 @@ export type AccessConfigForEmail = { }; export type AccessConfigForFlexCDN = { - apiUrl: string; + serverUrl: string; apiRole: string; accessKeyId: string; accessKey: string; @@ -226,7 +226,7 @@ export type AccessConfigForGoDaddy = { }; export type AccessConfigForGoEdge = { - apiUrl: string; + serverUrl: string; apiRole: string; accessKeyId: string; accessKey: string; @@ -257,7 +257,7 @@ export type AccessConfigForLarkBot = { }; export type AccessConfigForLeCDN = { - apiUrl: string; + serverUrl: string; apiVersion: string; apiRole: string; username: string; @@ -306,13 +306,13 @@ export type AccessConfigForPorkbun = { }; export type AccessConfigForPowerDNS = { - apiUrl: string; + serverUrl: string; apiKey: string; allowInsecureConnections?: boolean; }; export type AccessConfigForProxmoxVE = { - apiUrl: string; + serverUrl: string; apiToken: string; apiTokenSecret?: string; allowInsecureConnections?: boolean; @@ -328,14 +328,14 @@ export type AccessConfigForRainYun = { }; export type AccessConfigForRatPanel = { - apiUrl: string; + serverUrl: string; accessTokenId: number; accessToken: string; allowInsecureConnections?: boolean; }; export type AccessConfigForSafeLine = { - apiUrl: string; + serverUrl: string; apiToken: string; allowInsecureConnections?: boolean; }; diff --git a/ui/src/i18n/locales/en/nls.access.json b/ui/src/i18n/locales/en/nls.access.json index 41b81636..c2e52c6a 100644 --- a/ui/src/i18n/locales/en/nls.access.json +++ b/ui/src/i18n/locales/en/nls.access.json @@ -34,16 +34,16 @@ "access.form.certificate_authority.placeholder": "Please select a certificate authority", "access.form.notification_channel.label": "Notification channel", "access.form.notification_channel.placeholder": "Please select a notification channel", - "access.form.1panel_api_url.label": "1Panel URL", - "access.form.1panel_api_url.placeholder": "Please enter 1Panel URL", + "access.form.1panel_server_url.label": "1Panel server URL", + "access.form.1panel_server_url.placeholder": "Please enter 1Panel server URL", "access.form.1panel_api_version.label": "1Panel version", "access.form.1panel_api_version.placeholder": "Please select 1Panel version", "access.form.1panel_api_key.label": "1Panel API key", "access.form.1panel_api_key.placeholder": "Please enter 1Panel API key", "access.form.1panel_api_key.tooltip": "For more information, see https://docs.1panel.pro/dev_manual/api_manual/", - "access.form.1panel_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.1panel_allow_insecure_conns.switch.on": "Allow", - "access.form.1panel_allow_insecure_conns.switch.off": "Disallow", + "access.form.common_allow_insecure_conns.label": "Insecure SSL/TLS connections", + "access.form.common_allow_insecure_conns.switch.on": "Allow", + "access.form.common_allow_insecure_conns.switch.off": "Disallow", "access.form.acmeca_endpoint.label": "Endpoint", "access.form.acmeca_endpoint.placeholder": "Please enter endpoint", "access.form.acmeca_endpoint.tooltip": "For more information, see https://datatracker.ietf.org/doc/html/rfc8555#section-7.1.1", @@ -104,22 +104,16 @@ "access.form.upyun_password.tooltip": "For more information, see https://console.upyun.com/account/subaccount/", "access.form.baishan_api_token.label": "Baishan Cloud API token", "access.form.baishan_api_token.placeholder": "Please enter Baishan Cloud API token", - "access.form.baotapanel_api_url.label": "aaPanel URL", - "access.form.baotapanel_api_url.placeholder": "Please enter aaPanel URL", + "access.form.baotapanel_server_url.label": "aaPanel server URL", + "access.form.baotapanel_server_url.placeholder": "Please enter aaPanel server URL", "access.form.baotapanel_api_key.label": "aaPanel API key", "access.form.baotapanel_api_key.placeholder": "Please enter aaPanel API key", "access.form.baotapanel_api_key.tooltip": "For more information, see https://www.bt.cn/bbs/thread-20376-1-1.html", - "access.form.baotapanel_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.baotapanel_allow_insecure_conns.switch.on": "Allow", - "access.form.baotapanel_allow_insecure_conns.switch.off": "Disallow", - "access.form.baotawaf_api_url.label": "aaWAF URL", - "access.form.baotawaf_api_url.placeholder": "Please enter aaWAF URL", + "access.form.baotawaf_server_url.label": "aaWAF server URL", + "access.form.baotawaf_server_url.placeholder": "Please enter aaWAF server URL", "access.form.baotawaf_api_key.label": "aaWAF API key", "access.form.baotawaf_api_key.placeholder": "Please enter aaWAF API key", "access.form.baotawaf_api_key.tooltip": "For more information, see https://github.com/aaPanel/aaWAF/blob/main/API.md", - "access.form.baotawaf_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.baotawaf_allow_insecure_conns.switch.on": "Allow", - "access.form.baotawaf_allow_insecure_conns.switch.off": "Disallow", "access.form.byteplus_access_key.label": "BytePlus AccessKey", "access.form.byteplus_access_key.placeholder": "Please enter BytePlus AccessKey", "access.form.byteplus_access_key.tooltip": "For more information, see https://docs.byteplus.com/en/docs/byteplus-platform/docs-managing-keys", @@ -129,17 +123,14 @@ "access.form.cachefly_api_token.label": "CacheFly API token", "access.form.cachefly_api_token.placeholder": "Please enter CacheFly API token", "access.form.cachefly_api_token.tooltip": "For more information, see https://kb.cachefly.com/kb/guide/en/generating-tokens-and-keys-Oll9Irt5TI/Steps/2460228", - "access.form.cdnfly_api_url.label": "Cdnfly URL", - "access.form.cdnfly_api_url.placeholder": "Please enter Cdnfly URL", + "access.form.cdnfly_server_url.label": "Cdnfly server URL", + "access.form.cdnfly_server_url.placeholder": "Please enter Cdnfly server URL", "access.form.cdnfly_api_key.label": "Cdnfly user API key", "access.form.cdnfly_api_key.placeholder": "Please enter Cdnfly user API key", "access.form.cdnfly_api_key.tooltip": "For more information, see https://doc.cdnfly.cn/shiyongjieshao.html", "access.form.cdnfly_api_secret.label": "Cdnfly user API secret", "access.form.cdnfly_api_secret.placeholder": "Please enter Cdnfly user API secret", "access.form.cdnfly_api_secret.tooltip": "For more information, see https://doc.cdnfly.cn/shiyongjieshao.html", - "access.form.cdnfly_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.cdnfly_allow_insecure_conns.switch.on": "Allow", - "access.form.cdnfly_allow_insecure_conns.switch.off": "Disallow", "access.form.cloudflare_dns_api_token.label": "Cloudflare DNS API token", "access.form.cloudflare_dns_api_token.placeholder": "Please enter Cloudflare DNS API token", "access.form.cloudflare_dns_api_token.tooltip": "For more information, see https://developers.cloudflare.com/fundamentals/api/get-started/create-token/", @@ -201,8 +192,8 @@ "access.form.email_default_sender_address.placeholder": "Please enter default sender email address", "access.form.email_default_receiver_address.label": "Default receiver email address (Optional)", "access.form.email_default_receiver_address.placeholder": "Please enter default receiver email address", - "access.form.flexcdn_api_url.label": "FlexCDN URL", - "access.form.flexcdn_api_url.placeholder": "Please enter FlexCDN URL", + "access.form.flexcdn_server_url.label": "FlexCDN server URL", + "access.form.flexcdn_server_url.placeholder": "Please enter FlexCDN server URL", "access.form.flexcdn_api_role.label": "FlexCDN user role", "access.form.flexcdn_api_role.placeholder": "Please select FlexCDN user role", "access.form.flexcdn_api_role.option.user.label": "Platform user", @@ -213,9 +204,6 @@ "access.form.flexcdn_access_key.label": "FlexCDN AccessKey", "access.form.flexcdn_access_key.placeholder": "Please enter FlexCDN AccessKey", "access.form.flexcdn_access_key.tooltip": "For more information, see https://flexcdn.cn/docs/api/auth", - "access.form.flexcdn_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.flexcdn_allow_insecure_conns.switch.on": "Allow", - "access.form.flexcdn_allow_insecure_conns.switch.off": "Disallow", "access.form.gcore_api_token.label": "Gcore API token", "access.form.gcore_api_token.placeholder": "Please enter Gcore API token", "access.form.gcore_api_token.tooltip": "For more information, see https://api.gcore.com/docs/iam#section/Authentication", @@ -231,8 +219,8 @@ "access.form.godaddy_api_secret.label": "GoDaddy API secret", "access.form.godaddy_api_secret.placeholder": "Please enter GoDaddy API secret", "access.form.godaddy_api_secret.tooltip": "For more information, see https://developer.godaddy.com/", - "access.form.goedge_api_url.label": "GoEdge URL", - "access.form.goedge_api_url.placeholder": "Please enter GoEdge URL", + "access.form.goedge_server_url.label": "GoEdge server URL", + "access.form.goedge_server_url.placeholder": "Please enter GoEdge server URL", "access.form.goedge_api_role.label": "GoEdge user role", "access.form.goedge_api_role.placeholder": "Please select GoEdge user role", "access.form.goedge_api_role.option.user.label": "Platform user", @@ -243,9 +231,6 @@ "access.form.goedge_access_key.label": "GoEdge AccessKey", "access.form.goedge_access_key.placeholder": "Please enter GoEdge AccessKey", "access.form.goedge_access_key.tooltip": "For more information, see https://goedge.cloud/docs/API/Auth.md", - "access.form.goedge_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.goedge_allow_insecure_conns.switch.on": "Allow", - "access.form.goedge_allow_insecure_conns.switch.off": "Disallow", "access.form.googletrustservices_eab_kid.label": "ACME EAB KID", "access.form.googletrustservices_eab_kid.placeholder": "Please enter ACME EAB KID", "access.form.googletrustservices_eab_kid.tooltip": "For more information, see https://cloud.google.com/certificate-manager/docs/public-ca-tutorial", @@ -270,8 +255,8 @@ "access.form.larkbot_webhook_url.label": "Lark bot Webhook URL", "access.form.larkbot_webhook_url.placeholder": "Please enter Lark bot Webhook URL", "access.form.larkbot_webhook_url.tooltip": "For more information, see https://www.feishu.cn/hc/en-US/articles/807992406756", - "access.form.lecdn_api_url.label": "LeCDN URL", - "access.form.lecdn_api_url.placeholder": "Please enter LeCDN URL", + "access.form.lecdn_server_url.label": "LeCDN server URL", + "access.form.lecdn_server_url.placeholder": "Please enter LeCDN server URL", "access.form.lecdn_api_version.label": "LeCDN version", "access.form.lecdn_api_version.placeholder": "Please select LeCDN version", "access.form.lecdn_api_role.label": "LeCDN user role", @@ -282,9 +267,6 @@ "access.form.lecdn_username.placeholder": "Please enter LeCDN username", "access.form.lecdn_password.label": "LeCDN password", "access.form.lecdn_password.placeholder": "Please enter GoEdge password", - "access.form.lecdn_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.lecdn_allow_insecure_conns.switch.on": "Allow", - "access.form.lecdn_allow_insecure_conns.switch.off": "Disallow", "access.form.mattermost_server_url.label": "Mattermost server URL", "access.form.mattermost_server_url.placeholder": "Please enter Mattermost server URL", "access.form.mattermost_username.label": "Mattermost username", @@ -330,25 +312,19 @@ "access.form.porkbun_secret_api_key.label": "Porkbun secret API key", "access.form.porkbun_secret_api_key.placeholder": "Please enter Porkbun secret API key", "access.form.porkbun_secret_api_key.tooltip": "For more information, see https://porkbun.com/api/json/v3/documentation", - "access.form.powerdns_api_url.label": "PowerDNS URL", - "access.form.powerdns_api_url.placeholder": "Please enter PowerDNS URL", + "access.form.powerdns_server_url.label": "PowerDNS server URL", + "access.form.powerdns_server_url.placeholder": "Please enter PowerDNS server URL", "access.form.powerdns_api_key.label": "PowerDNS API key", "access.form.powerdns_api_key.placeholder": "Please enter PowerDNS API key", "access.form.powerdns_api_key.tooltip": "For more information, see https://doc.powerdns.com/authoritative/http-api/index.html#enabling-the-api", - "access.form.powerdns_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.powerdns_allow_insecure_conns.switch.on": "Allow", - "access.form.powerdns_allow_insecure_conns.switch.off": "Disallow", - "access.form.proxmoxve_api_url.label": "Proxmox VE URL", - "access.form.proxmoxve_api_url.placeholder": "Please enter Proxmox VE URL", + "access.form.proxmoxve_server_url.label": "Proxmox VE server URL", + "access.form.proxmoxve_server_url.placeholder": "Please enter Proxmox VE server URL", "access.form.proxmoxve_api_token.label": "Proxmox VE API token", "access.form.proxmoxve_api_token.placeholder": "Please enter Proxmox VE API token", "access.form.proxmoxve_api_token.tooltip": "For more information, see https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens", "access.form.proxmoxve_api_token_secret.label": "Proxmox VE API token secret (Optional)", "access.form.proxmoxve_api_token_secret.placeholder": "Please enter Proxmox VE API token secret", "access.form.proxmoxve_api_token_secret.tooltip": "For more information, see https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens", - "access.form.proxmoxve_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.proxmoxve_allow_insecure_conns.switch.on": "Allow", - "access.form.proxmoxve_allow_insecure_conns.switch.off": "Disallow", "access.form.qiniu_access_key.label": "Qiniu AccessKey", "access.form.qiniu_access_key.placeholder": "Please enter Qiniu AccessKey", "access.form.qiniu_access_key.tooltip": "For more information, see https://portal.qiniu.com/", @@ -358,25 +334,19 @@ "access.form.rainyun_api_key.label": "Rain Yun API key", "access.form.rainyun_api_key.placeholder": "Please enter Rain Yun API key", "access.form.rainyun_api_key.tooltip": "For more information, see https://app.rainyun.com/account/settings/api-key", - "access.form.ratpanel_api_url.label": "RatPanel URL", - "access.form.ratpanel_api_url.placeholder": "Please enter RatPanel URL", + "access.form.ratpanel_server_url.label": "RatPanel server URL", + "access.form.ratpanel_server_url.placeholder": "Please enter RatPanel server URL", "access.form.ratpanel_access_token_id.label": "RatPanel access token ID", "access.form.ratpanel_access_token_id.placeholder": "Please enter RatPanel access token ID", "access.form.ratpanel_access_token_id.tooltip": "For more information, see https://ratpanel.github.io/advanced/api.html", "access.form.ratpanel_access_token.label": "RatPanel access token", "access.form.ratpanel_access_token.placeholder": "Please enter RatPanel access token", "access.form.ratpanel_access_token.tooltip": "For more information, see https://ratpanel.github.io/advanced/api.html", - "access.form.ratpanel_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.ratpanel_allow_insecure_conns.switch.on": "Allow", - "access.form.ratpanel_allow_insecure_conns.switch.off": "Disallow", - "access.form.safeline_api_url.label": "SafeLine URL", - "access.form.safeline_api_url.placeholder": "Please enter SafeLine URL", + "access.form.safeline_server_url.label": "SafeLine server URL", + "access.form.safeline_server_url.placeholder": "Please enter SafeLine server URL", "access.form.safeline_api_token.label": "SafeLine API token", "access.form.safeline_api_token.placeholder": "Please enter SafeLine API token", "access.form.safeline_api_token.tooltip": "For more information, see https://docs.waf.chaitin.com/en/reference/articles/openapi", - "access.form.safeline_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.safeline_allow_insecure_conns.switch.on": "Allow", - "access.form.safeline_allow_insecure_conns.switch.off": "Disallow", "access.form.ssh_host.label": "Server host", "access.form.ssh_host.placeholder": "Please enter server host", "access.form.ssh_port.label": "Server port", @@ -466,9 +436,6 @@ "access.form.webhook_preset_data.option.pushplus.label": "PushPlus", "access.form.webhook_preset_data.option.serverchan.label": "ServerChan", "access.form.webhook_preset_data.option.common.label": "General template", - "access.form.webhook_allow_insecure_conns.label": "Insecure SSL/TLS connections", - "access.form.webhook_allow_insecure_conns.switch.on": "Allow", - "access.form.webhook_allow_insecure_conns.switch.off": "Disallow", "access.form.wecombot_webhook_url.label": "WeCom bot Webhook URL", "access.form.wecombot_webhook_url.placeholder": "Please enter WeCom bot Webhook URL", "access.form.wecombot_webhook_url.tooltip": "For more information, see https://open.work.weixin.qq.com/help2/pc/18401", diff --git a/ui/src/i18n/locales/zh/nls.access.json b/ui/src/i18n/locales/zh/nls.access.json index a5e89438..fdae1705 100644 --- a/ui/src/i18n/locales/zh/nls.access.json +++ b/ui/src/i18n/locales/zh/nls.access.json @@ -34,16 +34,16 @@ "access.form.certificate_authority.placeholder": "请选择证书颁发机构", "access.form.notification_channel.label": "通知渠道", "access.form.notification_channel.placeholder": "请选择通知渠道", - "access.form.1panel_api_url.label": "1Panel URL", - "access.form.1panel_api_url.placeholder": "请输入 1Panel URL", + "access.form.common_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", + "access.form.common_allow_insecure_conns.switch.on": "允许", + "access.form.common_allow_insecure_conns.switch.off": "不允许", + "access.form.1panel_server_url.label": "1Panel 服务地址", + "access.form.1panel_server_url.placeholder": "请输入 1Panel 服务地址", "access.form.1panel_api_version.label": "1Panel 版本", "access.form.1panel_api_version.placeholder": "请选择 1Panel 版本", "access.form.1panel_api_key.label": "1Panel 接口密钥", "access.form.1panel_api_key.placeholder": "请输入 1Panel 接口密钥", "access.form.1panel_api_key.tooltip": "这是什么?请参阅 https://1panel.cn/docs/dev_manual/api_manual/", - "access.form.1panel_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.1panel_allow_insecure_conns.switch.on": "允许", - "access.form.1panel_allow_insecure_conns.switch.off": "不允许", "access.form.acmeca_endpoint.label": "服务端点", "access.form.acmeca_endpoint.placeholder": "请输入服务端点", "access.form.acmeca_endpoint.tooltip": "这是什么?请参阅 https://datatracker.ietf.org/doc/html/rfc8555#section-7.1.1", @@ -95,22 +95,16 @@ "access.form.baiducloud_secret_access_key.tooltip": "这是什么?请参阅 https://cloud.baidu.com/doc/Reference/s/jjwvz2e3p", "access.form.baishan_api_token.label": "白山云 API Token", "access.form.baishan_api_token.placeholder": "请输入白山云 API Token", - "access.form.baotapanel_api_url.label": "宝塔面板 URL", - "access.form.baotapanel_api_url.placeholder": "请输入宝塔面板 URL", + "access.form.baotapanel_server_url.label": "宝塔面板服务地址", + "access.form.baotapanel_server_url.placeholder": "请输入宝塔面板服务地址", "access.form.baotapanel_api_key.label": "宝塔面板接口密钥", "access.form.baotapanel_api_key.placeholder": "请输入宝塔面板接口密钥", "access.form.baotapanel_api_key.tooltip": "这是什么?请参阅 https://www.bt.cn/bbs/thread-113890-1-1.html", - "access.form.baotapanel_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.baotapanel_allow_insecure_conns.switch.on": "允许", - "access.form.baotapanel_allow_insecure_conns.switch.off": "不允许", - "access.form.baotawaf_api_url.label": "堡塔云 WAF URL", - "access.form.baotawaf_api_url.placeholder": "请输入堡塔云 WAF URL", + "access.form.baotawaf_server_url.label": "堡塔云 WAF 服务地址", + "access.form.baotawaf_server_url.placeholder": "请输入堡塔云 WAF 服务地址", "access.form.baotawaf_api_key.label": "堡塔云 WAF 接口密钥", "access.form.baotawaf_api_key.placeholder": "请输入 堡塔云 WAF 接口密钥", "access.form.baotawaf_api_key.tooltip": "这是什么?请参阅 https://github.com/aaPanel/aaWAF/blob/main/API.md", - "access.form.baotawaf_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.baotawaf_allow_insecure_conns.switch.on": "允许", - "access.form.baotawaf_allow_insecure_conns.switch.off": "不允许", "access.form.bunny_api_key.label": "Bunny API Key", "access.form.bunny_api_key.placeholder": "请输入 Bunny API Key", "access.form.bunny_api_key.tooltip": "这是什么?请参阅 https://docs.bunny.net/reference/bunnynet-api-overview", @@ -123,17 +117,14 @@ "access.form.cachefly_api_token.label": "CacheFly API Token", "access.form.cachefly_api_token.placeholder": "请输入 CacheFly API Token", "access.form.cachefly_api_token.tooltip": "这是什么?请参阅 https://kb.cachefly.com/kb/guide/en/generating-tokens-and-keys-Oll9Irt5TI/Steps/2460228", - "access.form.cdnfly_api_url.label": "Cdnfly URL", - "access.form.cdnfly_api_url.placeholder": "请输入 Cdnfly URL", + "access.form.cdnfly_server_url.label": "Cdnfly 服务地址", + "access.form.cdnfly_server_url.placeholder": "请输入 Cdnfly 服务地址", "access.form.cdnfly_api_key.label": "Cdnfly 用户端 API Key", "access.form.cdnfly_api_key.placeholder": "请输入 Cdnfly 用户端 API Key", "access.form.cdnfly_api_key.tooltip": "这是什么?请参阅 https://doc.cdnfly.cn/shiyongjieshao.html", "access.form.cdnfly_api_secret.label": "Cdnfly 用户端 API Secret", "access.form.cdnfly_api_secret.placeholder": "请输入 Cdnfly 用户端 API Secret", "access.form.cdnfly_api_secret.tooltip": "这是什么?请参阅 https://doc.cdnfly.cn/shiyongjieshao.html", - "access.form.cdnfly_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.cdnfly_allow_insecure_conns.switch.on": "允许", - "access.form.cdnfly_allow_insecure_conns.switch.off": "不允许", "access.form.cloudflare_dns_api_token.label": "Cloudflare DNS API 令牌", "access.form.cloudflare_dns_api_token.placeholder": "请输入 Cloudflare DNS API 令牌", "access.form.cloudflare_dns_api_token.tooltip": "这是什么?请参阅 https://developers.cloudflare.com/fundamentals/api/get-started/create-token/", @@ -195,8 +186,8 @@ "access.form.email_default_sender_address.placeholder": "请输入默认的发送邮箱地址", "access.form.email_default_receiver_address.label": "默认的接收邮箱地址(可选)", "access.form.email_default_receiver_address.placeholder": "请输入默认的接收邮箱地址", - "access.form.flexcdn_api_url.label": "FlexCDN URL", - "access.form.flexcdn_api_url.placeholder": "请输入 FlexCDN URL", + "access.form.flexcdn_server_url.label": "FlexCDN 服务地址", + "access.form.flexcdn_server_url.placeholder": "请输入 FlexCDN 服务地址", "access.form.flexcdn_api_role.label": "FlexCDN 用户角色", "access.form.flexcdn_api_role.placeholder": "请选择 FlexCDN 用户角色", "access.form.flexcdn_api_role.option.user.label": "平台用户", @@ -207,9 +198,6 @@ "access.form.flexcdn_access_key.label": "FlexCDN AccessKey", "access.form.flexcdn_access_key.placeholder": "请输入 FlexCDN AccessKey", "access.form.flexcdn_access_key.tooltip": "这是什么?请参阅 https://flexcdn.cn/docs/api/auth", - "access.form.flexcdn_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.flexcdn_allow_insecure_conns.switch.on": "允许", - "access.form.flexcdn_allow_insecure_conns.switch.off": "不允许", "access.form.gcore_api_token.label": "Gcore API Token", "access.form.gcore_api_token.placeholder": "请输入 Gcore API Token", "access.form.gcore_api_token.tooltip": "这是什么?请参阅 https://api.gcore.com/docs/iam#section/Authentication", @@ -225,8 +213,8 @@ "access.form.godaddy_api_secret.label": "GoDaddy API Secret", "access.form.godaddy_api_secret.placeholder": "请输入 GoDaddy API Secret", "access.form.godaddy_api_secret.tooltip": "这是什么?请参阅 https://developer.godaddy.com/", - "access.form.goedge_api_url.label": "GoEdge URL", - "access.form.goedge_api_url.placeholder": "请输入 GoEdge URL", + "access.form.goedge_server_url.label": "GoEdge 服务地址", + "access.form.goedge_server_url.placeholder": "请输入 GoEdge 服务地址", "access.form.goedge_api_role.label": "GoEdge 用户角色", "access.form.goedge_api_role.placeholder": "请选择 GoEdge 用户角色", "access.form.goedge_api_role.option.user.label": "平台用户", @@ -237,9 +225,6 @@ "access.form.goedge_access_key.label": "GoEdge AccessKey", "access.form.goedge_access_key.placeholder": "请输入 GoEdge AccessKey", "access.form.goedge_access_key.tooltip": "这是什么?请参阅 https://goedge.cloud/docs/API/Auth.md", - "access.form.goedge_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.goedge_allow_insecure_conns.switch.on": "允许", - "access.form.goedge_allow_insecure_conns.switch.off": "不允许", "access.form.googletrustservices_eab_kid.label": "ACME EAB KID", "access.form.googletrustservices_eab_kid.placeholder": "请输入 ACME EAB KID", "access.form.googletrustservices_eab_kid.tooltip": "这是什么?请参阅 https://cloud.google.com/certificate-manager/docs/public-ca-tutorial", @@ -264,8 +249,8 @@ "access.form.larkbot_webhook_url.label": "飞书群机器人 Webhook 地址", "access.form.larkbot_webhook_url.placeholder": "请输入飞书群机器人 Webhook 地址", "access.form.larkbot_webhook_url.tooltip": "这是什么?请参阅 https://www.feishu.cn/hc/zh-CN/articles/807992406756", - "access.form.lecdn_api_url.label": "LeCDN URL", - "access.form.lecdn_api_url.placeholder": "请输入 LeCDN URL", + "access.form.lecdn_server_url.label": "LeCDN 服务地址", + "access.form.lecdn_server_url.placeholder": "请输入 LeCDN 服务地址", "access.form.lecdn_api_version.label": "LeCDN 版本", "access.form.lecdn_api_version.placeholder": "请选择 LeCDN 版本", "access.form.lecdn_api_role.label": "LeCDN 用户角色", @@ -276,9 +261,6 @@ "access.form.lecdn_username.placeholder": "请输入 LeCDN 用户名", "access.form.lecdn_password.label": "LeCDN 用户密码", "access.form.lecdn_password.placeholder": "请输入 LeCDN 用户密码", - "access.form.lecdn_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.lecdn_allow_insecure_conns.switch.on": "允许", - "access.form.lecdn_allow_insecure_conns.switch.off": "不允许", "access.form.mattermost_server_url.label": "Mattermost 服务地址", "access.form.mattermost_server_url.placeholder": "请输入 Mattermost 服务地址", "access.form.mattermost_username.label": "Mattermost 用户名", @@ -324,25 +306,19 @@ "access.form.porkbun_secret_api_key.label": "Porkbun Secret API Key", "access.form.porkbun_secret_api_key.placeholder": "请输入 Porkbun Secret API Key", "access.form.porkbun_secret_api_key.tooltip": "这是什么?请参阅 https://porkbun.com/api/json/v3/documentation", - "access.form.powerdns_api_url.label": "PowerDNS URL", - "access.form.powerdns_api_url.placeholder": "请输入 PowerDNS URL", + "access.form.powerdns_server_url.label": "PowerDNS 服务地址", + "access.form.powerdns_server_url.placeholder": "请输入 PowerDNS 服务地址", "access.form.powerdns_api_key.label": "PowerDNS API Key", "access.form.powerdns_api_key.placeholder": "请输入 PowerDNS API Key", "access.form.powerdns_api_key.tooltip": "这是什么?请参阅 https://doc.powerdns.com/authoritative/http-api/index.html#enabling-the-api", - "access.form.powerdns_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.powerdns_allow_insecure_conns.switch.on": "允许", - "access.form.powerdns_allow_insecure_conns.switch.off": "不允许", - "access.form.proxmoxve_api_url.label": "Proxmox VE URL", - "access.form.proxmoxve_api_url.placeholder": "请输入 Proxmox VE URL", + "access.form.proxmoxve_server_url.label": "Proxmox VE 服务地址", + "access.form.proxmoxve_server_url.placeholder": "请输入 Proxmox VE 服务地址", "access.form.proxmoxve_api_token.label": "Proxmox VE API Token", "access.form.proxmoxve_api_token.placeholder": "请输入 Proxmox VE API Token", "access.form.proxmoxve_api_token.tooltip": "这是什么?请参阅 https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens", "access.form.proxmoxve_api_token_secret.label": "Proxmox VE API Token Secret(可选)", "access.form.proxmoxve_api_token_secret.placeholder": "请输入 Proxmox VE API Token Secret", "access.form.proxmoxve_api_token_secret.tooltip": "这是什么?请参阅 https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens", - "access.form.proxmoxve_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.proxmoxve_allow_insecure_conns.switch.on": "允许", - "access.form.proxmoxve_allow_insecure_conns.switch.off": "不允许", "access.form.qiniu_access_key.label": "七牛云 AccessKey", "access.form.qiniu_access_key.placeholder": "请输入七牛云 AccessKey", "access.form.qiniu_access_key.tooltip": "这是什么?请参阅 https://portal.qiniu.com/", @@ -352,25 +328,19 @@ "access.form.rainyun_api_key.label": "雨云 API 密钥", "access.form.rainyun_api_key.placeholder": "请输入雨云 API 密钥", "access.form.rainyun_api_key.tooltip": "这是什么?请参阅 https://app.rainyun.com/account/settings/api-key", - "access.form.ratpanel_api_url.label": "耗子面板 URL", - "access.form.ratpanel_api_url.placeholder": "请输入耗子面板 URL", + "access.form.ratpanel_server_url.label": "耗子面板服务地址", + "access.form.ratpanel_server_url.placeholder": "请输入耗子面板服务地址", "access.form.ratpanel_access_token_id.label": "耗子面板 AccessToken ID", "access.form.ratpanel_access_token_id.placeholder": "请输入耗子面板 AccessToken ID", "access.form.ratpanel_access_token_id.tooltip": "这是什么?请参阅 https://ratpanel.github.io/advanced/api.html", "access.form.ratpanel_access_token.label": "耗子面板 AccessToken", "access.form.ratpanel_access_token.placeholder": "请输入耗子面板 AccessToken", "access.form.ratpanel_access_token.tooltip": "这是什么?请参阅 https://ratpanel.github.io/advanced/api.html", - "access.form.ratpanel_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.ratpanel_allow_insecure_conns.switch.on": "允许", - "access.form.ratpanel_allow_insecure_conns.switch.off": "不允许", - "access.form.safeline_api_url.label": "雷池 URL", - "access.form.safeline_api_url.placeholder": "请输入雷池 URL", + "access.form.safeline_server_url.label": "雷池服务地址", + "access.form.safeline_server_url.placeholder": "请输入雷池服务地址", "access.form.safeline_api_token.label": "雷池 API Token", "access.form.safeline_api_token.placeholder": "请输入雷池 API Token", "access.form.safeline_api_token.tooltip": "这是什么?请参阅 https://docs.waf-ce.chaitin.cn/zh/更多技术文档/OPENAPI", - "access.form.safeline_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.safeline_allow_insecure_conns.switch.on": "允许", - "access.form.safeline_allow_insecure_conns.switch.off": "不允许", "access.form.ssh_host.label": "服务器地址", "access.form.ssh_host.placeholder": "请输入服务器地址", "access.form.ssh_port.label": "服务器端口", @@ -466,9 +436,6 @@ "access.form.webhook_preset_data.option.pushplus.label": "PushPlus 推送加", "access.form.webhook_preset_data.option.serverchan.label": "Server 酱", "access.form.webhook_preset_data.option.common.label": "通用模板", - "access.form.webhook_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", - "access.form.webhook_allow_insecure_conns.switch.on": "允许", - "access.form.webhook_allow_insecure_conns.switch.off": "不允许", "access.form.wecombot_webhook_url.label": "企业微信群机器人 Webhook 地址", "access.form.wecombot_webhook_url.placeholder": "请输入企业微信群机器人 Webhook 地址", "access.form.wecombot_webhook_url.tooltip": "这是什么?请参阅 https://open.work.weixin.qq.com/help2/pc/18401", diff --git a/ui/src/i18n/locales/zh/nls.settings.json b/ui/src/i18n/locales/zh/nls.settings.json index cde8ec0f..b3da01aa 100644 --- a/ui/src/i18n/locales/zh/nls.settings.json +++ b/ui/src/i18n/locales/zh/nls.settings.json @@ -28,8 +28,8 @@ "settings.notification.channel.switch.off": "停用", "settings.notification.push_test.button": "推送测试消息", "settings.notification.push_test.pushed": "已推送", - "settings.notification.channel.form.bark_server_url.label": "服务器地址", - "settings.notification.channel.form.bark_server_url.placeholder": "请输入服务器地址", + "settings.notification.channel.form.bark_server_url.label": "服务地址", + "settings.notification.channel.form.bark_server_url.placeholder": "请输入服务地址", "settings.notification.channel.form.bark_server_url.tooltip": "这是什么?请参阅 https://bark.day.app/

为空时,将使用 Bark 默认服务器。", "settings.notification.channel.form.bark_device_key.label": "设备密钥", "settings.notification.channel.form.bark_device_key.placeholder": "请输入设备密钥",