# DDNS 系统

## 选择订阅支持服务商

* [x] 阿里云（国际 & 国内）
* [x] 🆕 Amazon Route 53
* [x] 🆕 Microsoft Azure
* [x] 🆕 百度智能云
* [x] CloudFlare
* [x] 🆕 ClouDNS
* [x] 🆕 DigitalOcean
* [x] 🆕 DNSimple
* [x] 🆙 DNSPod
* [x] 🆕 GoDaddy
* [x] 🆕 Google Cloud DNS
* [x] 🆕 HuaweiCloud 华为云
* [x] 🆕 Namecheap
* [x] Namesilo
* [x] 🆕 Porkbun
* [x] 🆕 Vercel
* [x] 🆕 Vultr

## 使用

1. 访问：网站地址/admin/system#extend
2. 设置【DNS服务商Key】【DNS服务商Secret】【DDNS模式】

### 设置详细

{% hint style="info" %}
✔️ 为 必填； ❌ 为 选填/不填
{% endhint %}

<table data-header-hidden><thead><tr><th width="216.33333333333331" align="center">服务商API申请链接</th><th width="245">DNS服务商Key</th><th>DNS服务商Secret</th></tr></thead><tbody><tr><td align="center"><p>服务商API</p><p>申请链接</p></td><td>DNS服务商Key</td><td>DNS服务商Secret</td></tr><tr><td align="center"><a href="https://ram.console.aliyun.com/manage/ak">阿里云（国际 &#x26; 国内）</a></td><td>✔️AccessKey ID</td><td>✔️AccessKey Secret</td></tr><tr><td align="center"><a href="https://console.aws.amazon.com/iam/home#/security_credentials">Amazon Route 53</a></td><td>✔️Access key ID 访问密钥 ID</td><td>✔️Secret access key 秘密访问密钥</td></tr><tr><td align="center">Microsoft Azure</td><td>✔️订阅ID,目录(租户) ID,应用程序(客户端) ID</td><td>✔️客户端密码【值】</td></tr><tr><td align="center"><a href="https://console.bce.baidu.com/iam/#/iam/accesslist">百度智能云</a></td><td>✔️Access Key</td><td>✔️Secret Key</td></tr><tr><td align="center"><a href="https://dash.cloudflare.com/profile/api-tokens">CloudFlare</a></td><td>✔️账号邮箱</td><td>✔️API 密钥- Global API Key</td></tr><tr><td align="center"><a href="https://www.cloudns.net/api-settings/">ClouDNS</a></td><td>✔️auth-id</td><td>✔️auth-password</td></tr><tr><td align="center"><a href="https://cloud.digitalocean.com/account/api/tokens">DigitalOcean</a></td><td>❌</td><td>✔️Personal access tokens</td></tr><tr><td align="center"><a href="https://dnsimple.com/dashboard">DNSimple</a></td><td>✔️account ID</td><td>✔️Access tokens</td></tr><tr><td align="center"><a href="https://console.dnspod.cn/account/token">DNSPod</a></td><td>✔️ SecretId</td><td>✔️SecretKey</td></tr><tr><td align="center"><a href="https://developer.godaddy.com/keys">GoDaddy</a></td><td>✔️Key</td><td>✔️Secret</td></tr><tr><td align="center"><a href="https://console.cloud.google.com/apis/credentials">Google</a></td><td>❌</td><td>✔️credentials</td></tr><tr><td align="center"><a href="https://console.huaweicloud.com/iam/#/mine/accessKey">HuaweiCloud 华为云</a></td><td>✔️Access Key ID</td><td>✔️Secret Access Key</td></tr><tr><td align="center"><a href="https://ap.www.namecheap.com/settings/tools/apiaccess/">Namecheap</a></td><td>✔️Username</td><td>✔️API Key</td></tr><tr><td align="center"><a href="https://www.namesilo.com/account/api-manager">Namesilo</a></td><td>❌</td><td>✔️API key</td></tr><tr><td align="center"><a href="https://porkbun.com/account/api">Porkbun</a></td><td>✔️API Key</td><td>✔️Secret Key</td></tr><tr><td align="center"><a href="https://vercel.com/account/tokens">Vercel</a></td><td>✔️Team ID</td><td>✔️Token</td></tr><tr><td align="center"><a href="https://my.vultr.com/settings/#settingsapi">Vultr</a></td><td>❌</td><td>✔️API Key</td></tr></tbody></table>

#### 备注 / 注意事项

<details>

<summary>Microsoft Azure</summary>

Key值 为 `订阅ID,目录(租户) ID,应用程序(客户端) ID`，这3个值用`,`连接！

1. 获取订阅ID: <https://portal.azure.com/#view/Microsoft_Azure_Billing/SubscriptionsBladeV2>
2. 创建客户端，获取 【应用程序(客户端) ID】 和 【目录(租户) ID】<br>

   <div data-full-width="true"><figure><img src="/files/FgsCDlpILzbr729yf4v3" alt="创建客户端" width="563"><figcaption><p>创建客户端</p></figcaption></figure></div>

   <figure><img src="/files/LS9CZ3XuNBbwG5zV6YXJ" alt="" width="563"><figcaption><p>获取 【应用程序(客户端) ID】 和 【目录(租户) ID】</p></figcaption></figure>
3. 创建客户端密码 获取 客户端密码【值】<br>

   <figure><img src="/files/ltLP8kd3lAu3G899BBdS" alt="" width="563"><figcaption><p>获取 客户端密码【值】</p></figcaption></figure>
4. 给予客户端访问权限 （可重复设置多个域名的权限，DDNS系统能区分不同域名）；
   1. 前往 DNS 区域，对应的域名；

      <figure><img src="/files/zdWLcdCo7V49shW5NftX" alt=""><figcaption><p>添加角色分配</p></figcaption></figure>
   2. 添加角色, DNS 区域参与者；<br>

      <figure><img src="/files/U2RW04vacZWSM3On6Ps8" alt="" width="563"><figcaption><p>搜索 [DNS]</p></figcaption></figure>

      <figure><img src="/files/Jq1nKY9WNdVTyMe5acpB" alt="" width="563"><figcaption><p>搜索 【客户端名称】</p></figcaption></figure>

      审批和分配完，既可

</details>

<details>

<summary>CloudFlare</summary>

API 不支持`cf，ga，gq，ml，tk`结尾的域名！！！

</details>

<details>

<summary>DigitalOcean</summary>

Custom Scopes 中勾选 domain；

</details>

<details>

<summary>DNSimple</summary>

相关信息获取路径为 Account => Access tokens；

</details>

<details>

<summary>GoDaddy</summary>

相关信息获取路径为 Account => Access tokens；

</details>

<details>

<summary>Google Cloud DNS</summary>

* 确保 Cloud DNS API 服务已经开启；在<https://console.cloud.google.com/apis/dashboard>开启
  * 在这里点击启用 开启<https://console.cloud.google.com/marketplace/product/google/dns.googleapis.com><br>

    <figure><img src="/files/QLP0B6yReSNHPQifyjWP" alt="" width="521"><figcaption></figcaption></figure>
* 从 <https://console.cloud.google.com/apis/credentials> 创建&下载 `服务账号`
* 赋予角色 `DNS Administrator`

  <figure><img src="/files/Y87nWR6PnddOn9o6i2FL" alt="" width="431"><figcaption></figcaption></figure>
* 创建密钥 json 类型<br>

  <figure><img src="/files/T8Jn8bzpIMTtP7RFzXBy" alt="" width="495"><figcaption></figcaption></figure>

可以将自动下载的json文件中内容全部填入Secret中，其中含有以下内容。其余值可以不保留；

```
project_id
private_key_id
client_email
private_key
```

</details>

<details>

<summary>Namecheap</summary>

* API 开通资格的前置条件：账户余额超过 50 美元，账户中的域名超过 20 个，或在过去两年内购买的域名总价值超过 50 美元；
* 请将会使用本服务的服务器IP 在 【Whitelisted IPs】中加白；

</details>

<details>

<summary>Porkbun</summary>

API 功能开启参考 <https://kb.porkbun.com/article/190-getting-started-with-the-porkbun-dns-api>

</details>

<details>

<summary>Vercel</summary>

域名所在 Project => Settings => General,  获取 Team ID；

</details>

<details>

<summary>Vultr</summary>

请将会使用本服务的服务器IP 在 【Access Control】中加白；

</details>

### 触发条件

{% hint style="info" %}
本系统默认使用的是子域名；例：当域名为baidu.com， 那么node.baidu.com，ex.test.baidu.com 均为baidu.com的子域名。
{% endhint %}

#### 节点添加

* 自动将子域名（面板标签为域名），IPV4和IPV6信息进行绑定；

#### 节点编辑

* 修改子域名时，自动删除原有域名，并将IPV4和IPV6加入至新域名
* 修改IP时，自动修改原有域名，至最新IP地址；

#### 节点删除

* 删除使用的子域名

#### 注意事项

* 当节点设置中开启了【DDNS】，本系统将不会主动设置该节点；

## 对接新服务商教程

{% hint style="info" %}
下表中提及文件皆可作为新对接文件的参考和代码规范资料！
{% endhint %}

将对接文件置于 `\app\Utils\DDNS` 下


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://proxypanel.gitbook.io/wiki/ddns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
