mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	域名解析增加CloudFlare DNS支持
This commit is contained in:
		@@ -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).
 | 
			
		||||
 
 | 
			
		||||
@@ -84,6 +84,10 @@ func (this *UpdatePopupAction) RunPost(params struct {
 | 
			
		||||
	ParamApiKey    string
 | 
			
		||||
	ParamApiSecret string
 | 
			
		||||
 | 
			
		||||
	// CloudFlare
 | 
			
		||||
	CloudFlareAPIKey string
 | 
			
		||||
	CloudFlareEmail  string
 | 
			
		||||
 | 
			
		||||
	// CustomHTTP
 | 
			
		||||
	ParamCustomHTTPURL    string
 | 
			
		||||
	ParamCustomHTTPSecret string
 | 
			
		||||
@@ -128,6 +132,14 @@ func (this *UpdatePopupAction) 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).
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
						<input type="text" name="dnsName" maxlength="64" style="width:10em" v-model="dnsName"/>
 | 
			
		||||
						<span class="ui label">.主域名</span>
 | 
			
		||||
					</div>
 | 
			
		||||
					<p class="comment">和主域名一起组成子域名。</p>
 | 
			
		||||
					<p class="comment">当前集群的子域名,和主域名一起组成集群节点的子域名。</p>
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
			<tr>
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@
 | 
			
		||||
					<input type="text" name="dnsName" maxlength="64" style="width:10em"/>
 | 
			
		||||
					<span class="ui label">.主域名</span>
 | 
			
		||||
				</div>
 | 
			
		||||
				<p class="comment">和主域名一起组成子域名。</p>
 | 
			
		||||
				<p class="comment">当前集群的子域名,和主域名一起组成集群节点的子域名。</p>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
	</table>
 | 
			
		||||
 
 | 
			
		||||
@@ -60,6 +60,24 @@
 | 
			
		||||
			</tr>
 | 
			
		||||
		</tbody>
 | 
			
		||||
 | 
			
		||||
        <!-- CloudFlare -->
 | 
			
		||||
        <tbody v-if="type == 'cloudFlare'">
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>API密钥 *</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input type="text" name="cloudFlareAPIKey" maxlength="100"/>
 | 
			
		||||
                    <p class="comment">在个人资料中的"API令牌"--"API密钥"--"Global API Key"中获取。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>账号邮箱 *</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input type="text" name="cloudFlareEmail" maxlength="100"/>
 | 
			
		||||
                    <p class="comment">登录账号使用的邮箱。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        </tbody>
 | 
			
		||||
 | 
			
		||||
		<!-- DNS.COM -->
 | 
			
		||||
		<tbody v-if="type == 'dnscom'">
 | 
			
		||||
			<tr>
 | 
			
		||||
 
 | 
			
		||||
@@ -43,6 +43,20 @@
 | 
			
		||||
		</tr>
 | 
			
		||||
	</tbody>
 | 
			
		||||
 | 
			
		||||
    <!-- CloudFlare -->
 | 
			
		||||
    <tbody v-if="provider.type == 'cloudFlare'">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>API密钥</td>
 | 
			
		||||
            <td>
 | 
			
		||||
                {{provider.apiParams.apiKey}}
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>账号邮箱</td>
 | 
			
		||||
            <td>{{provider.apiParams.email}}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </tbody>
 | 
			
		||||
 | 
			
		||||
    <!-- CustomHTTP -->
 | 
			
		||||
    <tbody v-if="provider.type == 'customHTTP'">
 | 
			
		||||
        <tr>
 | 
			
		||||
 
 | 
			
		||||
@@ -60,6 +60,25 @@
 | 
			
		||||
			</tr>
 | 
			
		||||
		</tbody>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        <!-- CloudFlare -->
 | 
			
		||||
        <tbody v-if="provider.type == 'cloudFlare'">
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>API密钥 *</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input type="text" name="cloudFlareAPIKey" 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"/>
 | 
			
		||||
                    <p class="comment">登录账号使用的邮箱。</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        </tbody>
 | 
			
		||||
 | 
			
		||||
        <!-- 自定义HTTP-->
 | 
			
		||||
        <tbody v-if="provider.type == 'customHTTP'">
 | 
			
		||||
        <tr>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user