Skip to content

Commit 09213bc

Browse files
committed
fix: mix configuration issue
1 parent d22bbb6 commit 09213bc

File tree

7 files changed

+116
-89
lines changed

7 files changed

+116
-89
lines changed

MULTI_PROVIDER.md

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@ Configure multiple providers with per-domain assignment:
1919
```json
2020
{
2121
"providers": {
22-
"cloudflare": {
22+
"Cloudflare": {
2323
"email": "[email protected]",
2424
"password": "your-cloudflare-api-token"
2525
},
26-
"dnspod": {
26+
"DNSPod": {
2727
"login_token": "your-dnspod-token"
2828
},
29-
"digitalocean": {
30-
"password": "your-digitalocean-api-token"
29+
"DigitalOcean": {
30+
"login_token": "your-digitalocean-api-token"
3131
}
3232
},
3333
"domains": [
3434
{
3535
"domain_name": "example.com",
3636
"sub_domains": ["www", "api"],
37-
"provider": "cloudflare"
37+
"provider": "Cloudflare"
3838
},
3939
{
4040
"domain_name": "mysite.net",
4141
"sub_domains": ["mail", "ftp"],
42-
"provider": "dnspod"
42+
"provider": "DNSPod"
4343
}
4444
]
4545
}
@@ -71,7 +71,7 @@ Combine global provider with specific per-domain providers:
7171
"provider": "DNSPod",
7272
"login_token": "your-dnspod-token",
7373
"providers": {
74-
"cloudflare": {
74+
"Cloudflare": {
7575
"email": "[email protected]",
7676
"password": "your-cloudflare-api-token"
7777
}
@@ -84,7 +84,7 @@ Combine global provider with specific per-domain providers:
8484
{
8585
"domain_name": "newsite.com",
8686
"sub_domains": ["www", "api"],
87-
"provider": "cloudflare"
87+
"provider": "Cloudflare"
8888
}
8989
]
9090
}
@@ -111,36 +111,40 @@ Domains support an optional `provider` field:
111111
{
112112
"domain_name": "example.com",
113113
"sub_domains": ["www", "api", "@"],
114-
"provider": "cloudflare"
114+
"provider": "Cloudflare"
115115
}
116116
```
117117

118118
If `provider` is omitted, the domain uses the global `provider` setting.
119119

120120
## Supported Providers
121121

122-
All existing providers are supported in multi-provider mode:
123-
124-
- Cloudflare
125-
- DNSPod
126-
- DigitalOcean
127-
- Alidns
128-
- Google
129-
- HE (Hurricane Electric)
130-
- Dreamhost
131-
- Duck DNS
132-
- NoIP
133-
- Scaleway
134-
- DynV6
135-
- Linode
136-
- Strato
137-
- Loopiase
138-
- Infomaniak
139-
- Hetzner
140-
- OVH
141-
- Dynu
142-
- IONOS
143-
- TransIP
122+
All existing providers are supported in multi-provider mode. Use these **exact** provider names in your configuration:
123+
124+
| Provider Name | Configuration Value | Authentication Methods |
125+
|---------------|-------------------|----------------------|
126+
| Cloudflare | `"Cloudflare"` | `email` + `password` OR `login_token` |
127+
| DNSPod | `"DNSPod"` | `password` OR `login_token` |
128+
| DigitalOcean | `"DigitalOcean"` | `login_token` |
129+
| AliDNS | `"AliDNS"` | `email` + `password` |
130+
| Google Domains | `"Google"` | `email` + `password` |
131+
| Hurricane Electric | `"HE"` | `password` |
132+
| Dreamhost | `"Dreamhost"` | `login_token` |
133+
| Duck DNS | `"DuckDNS"` | `login_token` |
134+
| NoIP | `"NoIP"` | `email` + `password` |
135+
| Scaleway | `"Scaleway"` | `login_token` |
136+
| DynV6 | `"Dynv6"` | `login_token` |
137+
| Linode | `"Linode"` | `login_token` |
138+
| Strato | `"Strato"` | `password` |
139+
| LoopiaSE | `"LoopiaSE"` | `password` |
140+
| Infomaniak | `"Infomaniak"` | `password` |
141+
| Hetzner | `"Hetzner"` | `login_token` |
142+
| OVH | `"OVH"` | `app_key` + `app_secret` + `consumer_key` |
143+
| Dynu | `"Dynu"` | `password` |
144+
| IONOS | `"IONOS"` | `login_token` |
145+
| TransIP | `"TransIP"` | `email` + `login_token` |
146+
147+
**Important**: Provider names are case-sensitive. Use the exact values from the "Configuration Value" column.
144148

145149
## Migration Guide
146150

@@ -153,7 +157,7 @@ All existing providers are supported in multi-provider mode:
153157
"provider": "DNSPod", // Keep existing
154158
"login_token": "old-token",
155159
"providers": { // Add new providers
156-
"cloudflare": {
160+
"Cloudflare": {
157161
"email": "[email protected]",
158162
"password": "cf-token"
159163
}
@@ -166,7 +170,7 @@ All existing providers are supported in multi-provider mode:
166170
{
167171
"domain_name": "new-domain.com",
168172
"sub_domains": ["www"],
169-
"provider": "cloudflare" // Uses Cloudflare
173+
"provider": "Cloudflare" // Uses Cloudflare
170174
}
171175
]
172176
}
@@ -208,13 +212,15 @@ INFO [2024-01-01T12:00:00Z] [ www, api ] of example.com (via cloudflare)
208212
```
209213
ERROR provider 'cloudflare' not found for domain example.com
210214
```
211-
**Solution**: Ensure the provider is configured in the `providers` section.
215+
**Solution**:
216+
1. Ensure the provider is configured in the `providers` section
217+
2. Check that you're using the correct case-sensitive provider name (e.g., `"Cloudflare"` not `"cloudflare"`)
212218

213219
### Authentication Failures
214220
```
215-
ERROR failed to create provider cloudflare: authentication failed
221+
ERROR failed to create provider Cloudflare: authentication failed
216222
```
217-
**Solution**: Verify credentials in the provider configuration section.
223+
**Solution**: Verify credentials in the provider configuration section and ensure you're using the correct authentication method for the provider.
218224

219225
### Mixed Configuration Issues
220226
If a domain doesn't specify a `provider` field, it will use the global `provider`. Ensure:

MULTI_PROVIDER_CN.md

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@ GoDNS 现已支持同时配置多个 DNS 提供商,允许您从单个 GoDNS
1919
```json
2020
{
2121
"providers": {
22-
"cloudflare": {
22+
"Cloudflare": {
2323
"email": "[email protected]",
2424
"password": "your-cloudflare-api-token"
2525
},
26-
"dnspod": {
26+
"DNSPod": {
2727
"login_token": "your-dnspod-token"
2828
},
29-
"digitalocean": {
30-
"password": "your-digitalocean-api-token"
29+
"DigitalOcean": {
30+
"login_token": "your-digitalocean-api-token"
3131
}
3232
},
3333
"domains": [
3434
{
3535
"domain_name": "example.com",
3636
"sub_domains": ["www", "api"],
37-
"provider": "cloudflare"
37+
"provider": "Cloudflare"
3838
},
3939
{
4040
"domain_name": "mysite.net",
4141
"sub_domains": ["mail", "ftp"],
42-
"provider": "dnspod"
42+
"provider": "DNSPod"
4343
}
4444
]
4545
}
@@ -71,7 +71,7 @@ GoDNS 现已支持同时配置多个 DNS 提供商,允许您从单个 GoDNS
7171
"provider": "DNSPod",
7272
"login_token": "your-dnspod-token",
7373
"providers": {
74-
"cloudflare": {
74+
"Cloudflare": {
7575
"email": "[email protected]",
7676
"password": "your-cloudflare-api-token"
7777
}
@@ -84,7 +84,7 @@ GoDNS 现已支持同时配置多个 DNS 提供商,允许您从单个 GoDNS
8484
{
8585
"domain_name": "newsite.com",
8686
"sub_domains": ["www", "api"],
87-
"provider": "cloudflare"
87+
"provider": "Cloudflare"
8888
}
8989
]
9090
}
@@ -111,36 +111,40 @@ GoDNS 现已支持同时配置多个 DNS 提供商,允许您从单个 GoDNS
111111
{
112112
"domain_name": "example.com",
113113
"sub_domains": ["www", "api", "@"],
114-
"provider": "cloudflare"
114+
"provider": "Cloudflare"
115115
}
116116
```
117117

118118
如果省略 `provider`,域名将使用全局 `provider` 设置。
119119

120120
## 支持的提供商
121121

122-
多提供商模式支持所有现有提供商:
123-
124-
- Cloudflare
125-
- DNSPod
126-
- DigitalOcean
127-
- Alidns
128-
- Google
129-
- HE (Hurricane Electric)
130-
- Dreamhost
131-
- Duck DNS
132-
- NoIP
133-
- Scaleway
134-
- DynV6
135-
- Linode
136-
- Strato
137-
- Loopiase
138-
- Infomaniak
139-
- Hetzner
140-
- OVH
141-
- Dynu
142-
- IONOS
143-
- TransIP
122+
多提供商模式支持所有现有提供商。请在配置中使用这些**精确**的提供商名称:
123+
124+
| 提供商名称 | 配置值 | 身份验证方法 |
125+
|-----------|-------|-------------|
126+
| Cloudflare | `"Cloudflare"` | `email` + `password``login_token` |
127+
| DNSPod | `"DNSPod"` | `password``login_token` |
128+
| DigitalOcean | `"DigitalOcean"` | `login_token` |
129+
| AliDNS | `"AliDNS"` | `email` + `password` |
130+
| Google Domains | `"Google"` | `email` + `password` |
131+
| Hurricane Electric | `"HE"` | `password` |
132+
| Dreamhost | `"Dreamhost"` | `login_token` |
133+
| Duck DNS | `"DuckDNS"` | `login_token` |
134+
| NoIP | `"NoIP"` | `email` + `password` |
135+
| Scaleway | `"Scaleway"` | `login_token` |
136+
| DynV6 | `"Dynv6"` | `login_token` |
137+
| Linode | `"Linode"` | `login_token` |
138+
| Strato | `"Strato"` | `password` |
139+
| LoopiaSE | `"LoopiaSE"` | `password` |
140+
| Infomaniak | `"Infomaniak"` | `password` |
141+
| Hetzner | `"Hetzner"` | `login_token` |
142+
| OVH | `"OVH"` | `app_key` + `app_secret` + `consumer_key` |
143+
| Dynu | `"Dynu"` | `password` |
144+
| IONOS | `"IONOS"` | `login_token` |
145+
| TransIP | `"TransIP"` | `email` + `login_token` |
146+
147+
**重要提示**:提供商名称区分大小写。请使用"配置值"列中的确切值。
144148

145149
## 迁移指南
146150

@@ -153,7 +157,7 @@ GoDNS 现已支持同时配置多个 DNS 提供商,允许您从单个 GoDNS
153157
"provider": "DNSPod", // 保持现有设置
154158
"login_token": "old-token",
155159
"providers": { // 添加新提供商
156-
"cloudflare": {
160+
"Cloudflare": {
157161
"email": "[email protected]",
158162
"password": "cf-token"
159163
}
@@ -166,7 +170,7 @@ GoDNS 现已支持同时配置多个 DNS 提供商,允许您从单个 GoDNS
166170
{
167171
"domain_name": "new-domain.com",
168172
"sub_domains": ["www"],
169-
"provider": "cloudflare" // 使用 Cloudflare
173+
"provider": "Cloudflare" // 使用 Cloudflare
170174
}
171175
]
172176
}
@@ -208,13 +212,15 @@ INFO [2024-01-01T12:00:00Z] [ www, api ] of example.com (通过 cloudflare)
208212
```
209213
ERROR provider 'cloudflare' not found for domain example.com
210214
```
211-
**解决方案**:确保提供商已在 `providers` 部分中配置。
215+
**解决方案**
216+
1. 确保提供商已在 `providers` 部分中配置
217+
2. 检查您是否使用了正确的区分大小写的提供商名称(例如,`"Cloudflare"` 而不是 `"cloudflare"`
212218

213219
### 身份验证失败
214220
```
215-
ERROR failed to create provider cloudflare: authentication failed
221+
ERROR failed to create provider Cloudflare: authentication failed
216222
```
217-
**解决方案**:验证提供商配置部分中的凭据。
223+
**解决方案**:验证提供商配置部分中的凭据,并确保您使用的是该提供商的正确身份验证方法
218224

219225
### 混合配置问题
220226
如果域名没有指定 `provider` 字段,它将使用全局 `provider`。确保:

configs/config_mixed_sample.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"login_token": "your-dnspod-token",
77

88
"providers": {
9-
"cloudflare": {
9+
"Cloudflare": {
1010
"email": "[email protected]",
1111
"password": "your-cloudflare-api-token"
1212
}
@@ -20,7 +20,7 @@
2020
{
2121
"domain_name": "newsite.com",
2222
"sub_domains": ["www", "api", "@"],
23-
"provider": "cloudflare"
23+
"provider": "Cloudflare"
2424
},
2525
{
2626
"domain_name": "another-old.net",

configs/config_multi_sample.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22
"comment": "Multi-provider configuration example - supports domains from different DNS providers",
33

44
"providers": {
5-
"cloudflare": {
5+
"Cloudflare": {
66
"email": "[email protected]",
77
"password": "your-cloudflare-api-token"
88
},
9-
"dnspod": {
9+
"DNSPod": {
1010
"login_token": "your-dnspod-token"
1111
},
12-
"digitalocean": {
13-
"password": "your-digitalocean-api-token"
12+
"DigitalOcean": {
13+
"login_token": "your-digitalocean-api-token"
1414
}
1515
},
1616

1717
"domains": [
1818
{
1919
"domain_name": "example.com",
2020
"sub_domains": ["www", "api", "@"],
21-
"provider": "cloudflare"
21+
"provider": "Cloudflare"
2222
},
2323
{
2424
"domain_name": "mycompany.net",
2525
"sub_domains": ["mail", "ftp"],
26-
"provider": "dnspod"
26+
"provider": "DNSPod"
2727
},
2828
{
2929
"domain_name": "mydomain.org",
3030
"sub_domains": ["blog", "shop"],
31-
"provider": "digitalocean"
31+
"provider": "DigitalOcean"
3232
}
3333
],
3434

0 commit comments

Comments
 (0)