mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-05 06:34:07 +08:00
feat: add spaceship dns provider (#8501)
Refs https://github.com/1Panel-dev/1Panel/issues/8494
This commit is contained in:
parent
e5bd5d17ba
commit
d6fde84dc9
3 changed files with 27 additions and 7 deletions
|
|
@ -15,6 +15,7 @@ import (
|
|||
"github.com/go-acme/lego/v4/providers/dns/namedotcom"
|
||||
"github.com/go-acme/lego/v4/providers/dns/namesilo"
|
||||
"github.com/go-acme/lego/v4/providers/dns/rainyun"
|
||||
"github.com/go-acme/lego/v4/providers/dns/spaceship"
|
||||
"github.com/go-acme/lego/v4/providers/dns/tencentcloud"
|
||||
"github.com/go-acme/lego/v4/providers/dns/vercel"
|
||||
"github.com/go-acme/lego/v4/providers/dns/volcengine"
|
||||
|
|
@ -99,6 +100,7 @@ const (
|
|||
HuaweiCloud DnsType = "HuaweiCloud"
|
||||
FreeMyIP DnsType = "FreeMyIP"
|
||||
Vercel DnsType = "Vercel"
|
||||
Spaceship DnsType = "Spaceship"
|
||||
)
|
||||
|
||||
type DNSParam struct {
|
||||
|
|
@ -240,6 +242,14 @@ func getDNSProviderConfig(dnsType DnsType, params string) (challenge.Provider, e
|
|||
vercelConfig.PropagationTimeout = propagationTimeout
|
||||
vercelConfig.PollingInterval = pollingInterval
|
||||
p, err = vercel.NewDNSProviderConfig(vercelConfig)
|
||||
case Spaceship:
|
||||
spaceshipConfig := spaceship.NewDefaultConfig()
|
||||
spaceshipConfig.APIKey = param.APIkey
|
||||
spaceshipConfig.APISecret = param.APISecret
|
||||
spaceshipConfig.PropagationTimeout = propagationTimeout
|
||||
spaceshipConfig.PollingInterval = pollingInterval
|
||||
spaceshipConfig.TTL = ttl
|
||||
p, err = spaceship.NewDNSProviderConfig(spaceshipConfig)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -220,6 +220,10 @@ export const DNSTypes = [
|
|||
label: i18n.global.t('website.rainyun'),
|
||||
value: 'RainYun',
|
||||
},
|
||||
{
|
||||
label: 'Spaceship',
|
||||
value: 'Spaceship',
|
||||
},
|
||||
];
|
||||
|
||||
export const Fields = [
|
||||
|
|
|
|||
|
|
@ -54,11 +54,6 @@
|
|||
<el-input v-model.trim="account.authorization['secretKey']"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="account.type === 'RainYun'">
|
||||
<el-form-item label="API Key" prop="authorization.apiKey">
|
||||
<el-input v-model.trim="account.authorization['apiKey']"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="account.type === 'CloudDns'">
|
||||
<el-form-item label="Client ID" prop="authorization.clientID">
|
||||
<el-input v-model.trim="account.authorization['clientID']"></el-input>
|
||||
|
|
@ -84,14 +79,24 @@
|
|||
<el-form-item
|
||||
label="API Key"
|
||||
prop="authorization.apiKey"
|
||||
v-if="account.type === 'NameCheap' || account.type === 'NameSilo' || account.type === 'Godaddy'"
|
||||
v-if="
|
||||
account.type === 'NameCheap' ||
|
||||
account.type === 'NameSilo' ||
|
||||
account.type === 'Godaddy' ||
|
||||
account.type === 'RainYun' ||
|
||||
account.type === 'Spaceship'
|
||||
"
|
||||
>
|
||||
<el-input v-model.trim="account.authorization['apiKey']"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="API User" prop="authorization.apiUser" v-if="account.type === 'NameCheap'">
|
||||
<el-input v-model.trim="account.authorization['apiUser']"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="API Secret" prop="authorization.apiSecret" v-if="account.type === 'Godaddy'">
|
||||
<el-form-item
|
||||
label="API Secret"
|
||||
prop="authorization.apiSecret"
|
||||
v-if="account.type === 'Godaddy' || account.type === 'Spaceship'"
|
||||
>
|
||||
<el-input v-model.trim="account.authorization['apiSecret']"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="account.type === 'NameCom'">
|
||||
|
|
@ -153,6 +158,7 @@ const rules = ref<any>({
|
|||
apiKey: [Rules.requiredInput],
|
||||
apiUser: [Rules.requiredInput],
|
||||
secretID: [Rules.requiredInput],
|
||||
apiSecret: [Rules.requiredInput],
|
||||
},
|
||||
});
|
||||
const account = ref({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue