mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-08 22:30:24 +08:00
域名解析增加GoDaddy DNS(目前仅商业版可用)
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
//go:build !plus
|
||||
// +build !plus
|
||||
|
||||
package providers
|
||||
|
||||
import (
|
||||
@@ -77,8 +82,8 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
ParamApiSecret string
|
||||
|
||||
// CloudFlare
|
||||
CloudFlareAPIKey string
|
||||
CloudFlareEmail string
|
||||
ParamCloudFlareAPIKey string
|
||||
ParamCloudFlareEmail string
|
||||
|
||||
// Local EdgeDNS
|
||||
ParamLocalEdgeDNSClusterId int64
|
||||
@@ -137,12 +142,12 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
apiParams["apiSecret"] = params.ParamApiSecret
|
||||
case "cloudFlare":
|
||||
params.Must.
|
||||
Field("cloudFlareAPIKey", params.CloudFlareAPIKey).
|
||||
Field("paramCloudFlareAPIKey", params.ParamCloudFlareAPIKey).
|
||||
Require("请输入API密钥").
|
||||
Field("cloudFlareEmail", params.CloudFlareEmail).
|
||||
Field("paramCloudFlareEmail", params.ParamCloudFlareEmail).
|
||||
Email("请输入正确格式的邮箱地址")
|
||||
apiParams["apiKey"] = params.CloudFlareAPIKey
|
||||
apiParams["email"] = params.CloudFlareEmail
|
||||
apiParams["apiKey"] = params.ParamCloudFlareAPIKey
|
||||
apiParams["email"] = params.ParamCloudFlareEmail
|
||||
case "localEdgeDNS":
|
||||
params.Must.
|
||||
Field("ParamLocalEdgeDNSClusterId", params.ParamLocalEdgeDNSClusterId).
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
//go:build !plus
|
||||
// +build !plus
|
||||
|
||||
package providers
|
||||
|
||||
import (
|
||||
@@ -106,8 +109,8 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
||||
ParamApiSecret string
|
||||
|
||||
// CloudFlare
|
||||
CloudFlareAPIKey string
|
||||
CloudFlareEmail string
|
||||
ParamCloudFlareAPIKey string
|
||||
ParamCloudFlareEmail string
|
||||
|
||||
// Local EdgeDNS
|
||||
ParamLocalEdgeDNSClusterId int64
|
||||
@@ -168,12 +171,12 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
||||
apiParams["apiSecret"] = params.ParamApiSecret
|
||||
case "cloudFlare":
|
||||
params.Must.
|
||||
Field("cloudFlareAPIKey", params.CloudFlareAPIKey).
|
||||
Field("paramCloudFlareAPIKey", params.ParamCloudFlareAPIKey).
|
||||
Require("请输入API密钥").
|
||||
Field("cloudFlareEmail", params.CloudFlareEmail).
|
||||
Field("paramCloudFlareEmail", params.ParamCloudFlareEmail).
|
||||
Email("请输入正确格式的邮箱地址")
|
||||
apiParams["apiKey"] = params.CloudFlareAPIKey
|
||||
apiParams["email"] = params.CloudFlareEmail
|
||||
apiParams["apiKey"] = params.ParamCloudFlareAPIKey
|
||||
apiParams["email"] = params.ParamCloudFlareEmail
|
||||
case "localEdgeDNS":
|
||||
params.Must.
|
||||
Field("ParamLocalEdgeDNSClusterId", params.ParamLocalEdgeDNSClusterId).
|
||||
|
||||
@@ -93,14 +93,14 @@
|
||||
<tr>
|
||||
<td>API密钥 *</td>
|
||||
<td>
|
||||
<input type="text" name="cloudFlareAPIKey" maxlength="100"/>
|
||||
<input type="text" name="paramCloudFlareAPIKey" maxlength="100"/>
|
||||
<p class="comment">在个人资料中的"API令牌"--"API密钥"--"Global API Key"中获取。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>账号邮箱 *</td>
|
||||
<td>
|
||||
<input type="text" name="cloudFlareEmail" maxlength="100"/>
|
||||
<input type="text" name="paramCloudFlareEmail" maxlength="100"/>
|
||||
<p class="comment">登录账号使用的邮箱。</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -124,6 +124,23 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- GoDaddy -->
|
||||
<tbody v-if="type == 'godaddy'">
|
||||
<tr>
|
||||
<td>Key *</td>
|
||||
<td>
|
||||
<input type="text" name="paramGoDaddyKey" maxlength="100"/>
|
||||
<p class="comment">可以在GoDaddy<a href="https://developer.godaddy.com/keys" target="_blank">开发者中心</a>添加。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Secret *</td>
|
||||
<td>
|
||||
<input type="text" name="paramGoDaddySecret" maxlength="100"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- Edge DNS -->
|
||||
<tbody v-if="type == 'localEdgeDNS'">
|
||||
<tr>
|
||||
|
||||
@@ -76,6 +76,20 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- GoDaddy -->
|
||||
<tbody v-if="provider.type == 'godaddy'">
|
||||
<tr>
|
||||
<td class="color-border">Key</td>
|
||||
<td>
|
||||
{{provider.apiParams.key}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">Secret</td>
|
||||
<td>{{provider.apiParams.secret}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- Local EdgeDNS -->
|
||||
<tbody v-if="provider.type == 'localEdgeDNS'">
|
||||
<tr>
|
||||
|
||||
@@ -93,19 +93,36 @@
|
||||
<tr>
|
||||
<td>API密钥 *</td>
|
||||
<td>
|
||||
<input type="text" name="cloudFlareAPIKey" maxlength="100" v-model="provider.params.apiKey"/>
|
||||
<input type="text" name="paramCloudFlareAPIKey" maxlength="100" v-model="provider.params.apiKey"/>
|
||||
<p class="comment">在个人资料中的"API令牌"--"API密钥"--"Global API Key"中获取。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>账号邮箱 *</td>
|
||||
<td>
|
||||
<input type="text" name="cloudFlareEmail" maxlength="100" v-model="provider.params.email"/>
|
||||
<input type="text" name="paramCloudFlareEmail" maxlength="100" v-model="provider.params.email"/>
|
||||
<p class="comment">登录账号使用的邮箱。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- GoDaddy -->
|
||||
<tbody v-if="provider.type == 'godaddy'">
|
||||
<tr>
|
||||
<td>Key *</td>
|
||||
<td>
|
||||
<input type="text" name="paramGoDaddyKey" maxlength="100" v-model="provider.params.key"/>
|
||||
<p class="comment">可以在GoDaddy<a href="https://developer.godaddy.com/keys" target="_blank">开发者中心</a>添加。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Secret *</td>
|
||||
<td>
|
||||
<input type="text" name="paramGoDaddySecret" maxlength="100" v-model="provider.params.secret"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- Edge DNS -->
|
||||
<tbody v-if="provider.type == 'localEdgeDNS'">
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user