域名解析增加CloudFlare DNS支持

This commit is contained in:
GoEdgeLab
2021-04-15 17:02:35 +08:00
parent ddfc80261f
commit f004bb209e
7 changed files with 77 additions and 2 deletions

View File

@@ -55,6 +55,10 @@ func (this *CreatePopupAction) RunPost(params struct {
ParamApiKey string
ParamApiSecret string
// CloudFlare
CloudFlareAPIKey string
CloudFlareEmail string
// CustomHTTP
ParamCustomHTTPURL string
ParamCustomHTTPSecret string
@@ -97,6 +101,14 @@ func (this *CreatePopupAction) RunPost(params struct {
apiParams["apiKey"] = params.ParamApiKey
apiParams["apiSecret"] = params.ParamApiSecret
case "cloudFlare":
params.Must.
Field("cloudFlareAPIKey", params.CloudFlareAPIKey).
Require("请输入API密钥").
Field("cloudFlareEmail", params.CloudFlareEmail).
Email("请输入正确格式的邮箱地址")
apiParams["apiKey"] = params.CloudFlareAPIKey
apiParams["email"] = params.CloudFlareEmail
case "customHTTP":
params.Must.
Field("paramCustomHTTPURL", params.ParamCustomHTTPURL).