mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
feat: 新增雨云DNS提供商
This commit is contained in:
@@ -10,6 +10,13 @@ import (
|
|||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
azcorecloud "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
|
azcorecloud "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
|
||||||
"github.com/go-acme/lego/v4/certcrypto"
|
"github.com/go-acme/lego/v4/certcrypto"
|
||||||
"github.com/go-acme/lego/v4/certificate"
|
"github.com/go-acme/lego/v4/certificate"
|
||||||
@@ -31,18 +38,13 @@ import (
|
|||||||
"github.com/go-acme/lego/v4/providers/dns/namedotcom"
|
"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/namesilo"
|
||||||
"github.com/go-acme/lego/v4/providers/dns/ns1"
|
"github.com/go-acme/lego/v4/providers/dns/ns1"
|
||||||
|
"github.com/go-acme/lego/v4/providers/dns/rainyun"
|
||||||
"github.com/go-acme/lego/v4/providers/dns/route53"
|
"github.com/go-acme/lego/v4/providers/dns/route53"
|
||||||
"github.com/go-acme/lego/v4/providers/dns/spaceship"
|
"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/tencentcloud"
|
||||||
"github.com/go-acme/lego/v4/providers/dns/volcengine"
|
"github.com/go-acme/lego/v4/providers/dns/volcengine"
|
||||||
"github.com/go-acme/lego/v4/providers/dns/westcn"
|
"github.com/go-acme/lego/v4/providers/dns/westcn"
|
||||||
"github.com/go-acme/lego/v4/registration"
|
"github.com/go-acme/lego/v4/registration"
|
||||||
"net/http"
|
|
||||||
"net/url"
|
|
||||||
"os"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var AlgorithmMap = map[string]certcrypto.KeyType{
|
var AlgorithmMap = map[string]certcrypto.KeyType{
|
||||||
@@ -217,6 +219,11 @@ func GetDNSProvider(providerName string, creds map[string]string, httpClient *ht
|
|||||||
config.APISecret = creds["api_secret"]
|
config.APISecret = creds["api_secret"]
|
||||||
config.PropagationTimeout = maxWait
|
config.PropagationTimeout = maxWait
|
||||||
return spaceship.NewDNSProviderConfig(config)
|
return spaceship.NewDNSProviderConfig(config)
|
||||||
|
case "rainyun":
|
||||||
|
config := rainyun.NewDefaultConfig()
|
||||||
|
config.APIKey = creds["api_key"]
|
||||||
|
config.PropagationTimeout = maxWait
|
||||||
|
return rainyun.NewDNSProviderConfig(config)
|
||||||
case "btdomain":
|
case "btdomain":
|
||||||
config := bt.NewDefaultConfig()
|
config := bt.NewDefaultConfig()
|
||||||
config.AccountID = creds["account_id"]
|
config.AccountID = creds["account_id"]
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ func init() {
|
|||||||
INSERT INTO access_type (name, type) VALUES ('1panel', 'host');`)
|
INSERT INTO access_type (name, type) VALUES ('1panel', 'host');`)
|
||||||
|
|
||||||
InsertIfNotExists(db, "access_type", map[string]any{"name": "cloudflare", "type": "host"}, []string{"name", "type"}, []any{"cloudflare", "host"})
|
InsertIfNotExists(db, "access_type", map[string]any{"name": "cloudflare", "type": "host"}, []string{"name", "type"}, []any{"cloudflare", "host"})
|
||||||
|
InsertIfNotExists(db, "access_type", map[string]any{"name": "rainyun", "type": "dns"}, []string{"name", "type"}, []any{"rainyun", "dns"})
|
||||||
InsertIfNotExists(db, "access_type", map[string]any{"name": "cloudflare", "type": "dns"}, []string{"name", "type"}, []any{"cloudflare", "dns"})
|
InsertIfNotExists(db, "access_type", map[string]any{"name": "cloudflare", "type": "dns"}, []string{"name", "type"}, []any{"cloudflare", "dns"})
|
||||||
InsertIfNotExists(db, "access_type", map[string]any{"name": "huaweicloud", "type": "host"}, []string{"name", "type"}, []any{"huaweicloud", "host"})
|
InsertIfNotExists(db, "access_type", map[string]any{"name": "huaweicloud", "type": "host"}, []string{"name", "type"}, []any{"huaweicloud", "host"})
|
||||||
InsertIfNotExists(db, "access_type", map[string]any{"name": "huaweicloud", "type": "dns"}, []string{"name", "type"}, []any{"huaweicloud", "dns"})
|
InsertIfNotExists(db, "access_type", map[string]any{"name": "huaweicloud", "type": "dns"}, []string{"name", "type"}, []any{"huaweicloud", "dns"})
|
||||||
|
|||||||
@@ -278,6 +278,12 @@ export const ApiProjectConfig: Record<string, ApiProjectType> = {
|
|||||||
hostRelated: { default: { name: "BTDomain" } },
|
hostRelated: { default: { name: "BTDomain" } },
|
||||||
sort: 33,
|
sort: 33,
|
||||||
},
|
},
|
||||||
|
rainyun: {
|
||||||
|
name: "雨云",
|
||||||
|
icon: "rainyun",
|
||||||
|
type: ["dns"],
|
||||||
|
sort: 33,
|
||||||
|
},
|
||||||
plugin: {
|
plugin: {
|
||||||
name: "插件",
|
name: "插件",
|
||||||
icon: "plugin",
|
icon: "plugin",
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ import { testAccess, getPlugins } from "@/api/access";
|
|||||||
// import { useLocalStorage } from '@vueuse/core'
|
// import { useLocalStorage } from '@vueuse/core'
|
||||||
|
|
||||||
import ApiManageForm from "./components/ApiManageModel";
|
import ApiManageForm from "./components/ApiManageModel";
|
||||||
import SvgIcon from "@components/SvgIcon";
|
import SvgIcon from "@/components/svgIcon";
|
||||||
import TypeIcon from "@components/TypeIcon";
|
import TypeIcon from "@/components/typeIcon";
|
||||||
import { noSideSpace } from "@lib/utils";
|
import { noSideSpace } from "@lib/utils";
|
||||||
import { JSX } from "vue/jsx-runtime";
|
import { JSX } from "vue/jsx-runtime";
|
||||||
|
|
||||||
@@ -1269,6 +1269,15 @@ export const useApiFormController = (
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case "rainyun":
|
||||||
|
items.push(
|
||||||
|
useFormInput("API Key", "config.api_key", {
|
||||||
|
type: "password",
|
||||||
|
showPasswordOn: "click",
|
||||||
|
allowInput: noSideSpace,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
break;
|
||||||
case "plugin":
|
case "plugin":
|
||||||
items.push(
|
items.push(
|
||||||
useFormCustom(() => {
|
useFormCustom(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user