From a027bde148620463f34d5f556b739cb7d92b2ceb Mon Sep 17 00:00:00 2001 From: v-me-50 Date: Wed, 17 Dec 2025 15:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E6=94=AF=E6=8C=81=E5=8A=A8=E6=80=81=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B=20=E3=80=90?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=91=E8=8E=B7=E5=8F=96=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=94=AF=E6=8C=81=E7=8A=B6=E6=80=81=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=20=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91dns=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E5=95=86=E8=85=BE=E8=AE=AF=E4=BA=91eo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/access.go | 23 ++ backend/app/api/cert.go | 3 +- backend/internal/cert/apply/apply.go | 9 +- backend/internal/cert/cert.go | 33 ++- backend/internal/cert/deploy/plugin/plugin.go | 138 +++++++++- backend/internal/cert/deploy/tencentcloud.go | 6 +- backend/internal/setting/setting.go | 21 +- backend/route/route.go | 1 + backend/server/server.go | 43 ++- go.mod | 89 ++++--- go.sum | 200 +++++++------- plugins/alicloud/action.go | 52 ++++ plugins/alicloud/cas/action.go | 65 +++++ plugins/alicloud/cdn/action.go | 58 +++++ plugins/alicloud/dcdn/action.go | 56 ++++ plugins/alicloud/esa/action.go | 74 ++++++ plugins/alicloud/main.go | 105 ++++++++ plugins/alicloud/metadata.json | 118 +++++++++ plugins/alicloud/oss/action.go | 62 +++++ plugins/alicloud/waf/action.go | 54 ++++ plugins/alicloud/waf/client.go | 246 ++++++++++++++++++ plugins/aliyun/action.go | 156 ----------- plugins/aliyun/cas/action.go | 31 --- plugins/aliyun/esa/action.go | 63 ----- plugins/aliyun/main.go | 123 --------- plugins/doge/action.go | 225 ---------------- plugins/doge/main.go | 117 --------- plugins/doge/metadata.json | 34 +++ version.json | 5 + 29 files changed, 1318 insertions(+), 892 deletions(-) create mode 100644 plugins/alicloud/action.go create mode 100644 plugins/alicloud/cas/action.go create mode 100644 plugins/alicloud/cdn/action.go create mode 100644 plugins/alicloud/dcdn/action.go create mode 100644 plugins/alicloud/esa/action.go create mode 100644 plugins/alicloud/main.go create mode 100644 plugins/alicloud/metadata.json create mode 100644 plugins/alicloud/oss/action.go create mode 100644 plugins/alicloud/waf/action.go create mode 100644 plugins/alicloud/waf/client.go delete mode 100644 plugins/aliyun/action.go delete mode 100644 plugins/aliyun/cas/action.go delete mode 100644 plugins/aliyun/esa/action.go delete mode 100644 plugins/aliyun/main.go delete mode 100644 plugins/doge/action.go delete mode 100644 plugins/doge/main.go create mode 100644 plugins/doge/metadata.json create mode 100644 version.json diff --git a/backend/app/api/access.go b/backend/app/api/access.go index 9cd08dd..db68200 100644 --- a/backend/app/api/access.go +++ b/backend/app/api/access.go @@ -408,3 +408,26 @@ func GetPlugins(c *gin.Context) { public.SuccessData(c, data, len(data)) return } + +func GetPluginRawMetadata(c *gin.Context) { + var form struct { + Name string `form:"name"` + } + err := c.Bind(&form) + if err != nil { + public.FailMsg(c, err.Error()) + return + } + form.Name = strings.TrimSpace(form.Name) + if form.Name == "" { + public.FailMsg(c, "插件名称不能为空") + return + } + data, err := plugin.GetPluginRawMetadata(form.Name) + if err != nil { + public.FailMsg(c, err.Error()) + return + } + public.SuccessData(c, data, 0) + return +} diff --git a/backend/app/api/cert.go b/backend/app/api/cert.go index fd964f5..9bef926 100644 --- a/backend/app/api/cert.go +++ b/backend/app/api/cert.go @@ -14,13 +14,14 @@ func GetCertList(c *gin.Context) { Search string `form:"search"` Page int64 `form:"p"` Limit int64 `form:"limit"` + Status int64 `form:"status"` } err := c.Bind(&form) if err != nil { public.FailMsg(c, err.Error()) return } - certList, count, err := cert.GetList(form.Search, form.Page, form.Limit) + certList, count, err := cert.GetList(form.Search, form.Page, form.Limit, form.Status) if err != nil { public.FailMsg(c, err.Error()) return diff --git a/backend/internal/cert/apply/apply.go b/backend/internal/cert/apply/apply.go index 24c97a0..f2abaf2 100644 --- a/backend/internal/cert/apply/apply.go +++ b/backend/internal/cert/apply/apply.go @@ -31,6 +31,7 @@ import ( "github.com/go-acme/lego/v4/providers/dns/cloudflare" "github.com/go-acme/lego/v4/providers/dns/cloudns" "github.com/go-acme/lego/v4/providers/dns/constellix" + "github.com/go-acme/lego/v4/providers/dns/edgeone" "github.com/go-acme/lego/v4/providers/dns/gcore" "github.com/go-acme/lego/v4/providers/dns/godaddy" "github.com/go-acme/lego/v4/providers/dns/huaweicloud" @@ -234,8 +235,12 @@ func GetDNSProvider(providerName string, creds map[string]string, httpClient *ht } config.PropagationTimeout = maxWait return bt.NewDNSProviderConfig(config) - //case "edgeone": - //config := + case "edgeone": + config := edgeone.NewDefaultConfig() + config.SecretID = creds["secret_id"] + config.SecretKey = creds["secret_key"] + config.PropagationTimeout = maxWait + return edgeone.NewDNSProviderConfig(config) default: return nil, fmt.Errorf("不支持的 DNS Provider: %s", providerName) diff --git a/backend/internal/cert/cert.go b/backend/internal/cert/cert.go index 6436e4f..fa4f38d 100644 --- a/backend/internal/cert/cert.go +++ b/backend/internal/cert/cert.go @@ -17,7 +17,7 @@ func GetSqlite() (*public.Sqlite, error) { return s, nil } -func GetList(search string, p, limit int64) ([]map[string]any, int, error) { +func GetList(search string, p, limit, status int64) ([]map[string]any, int, error) { var data []map[string]any var count int64 s, err := GetSqlite() @@ -35,13 +35,30 @@ func GetList(search string, p, limit int64) ([]map[string]any, int, error) { } } - if search != "" { - count, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Count() - data, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Limit(limits).Order("end_time", "esc").Select() - } else { - count, err = s.Count() - data, err = s.Order("end_time", "esc").Limit(limits).Select() + // 获取当前时间 + now := time.Now() + // 转换为字符串格式 + nowStr := now.Format("2006-01-02 15:04:05") + // 30 天后的时间 + nowPlus30Days := now.AddDate(0, 0, 30) + nowPlus30DaysStr := nowPlus30Days.Format("2006-01-02 15:04:05") + + filterSql := "1=1 " + // status: -1 已过期 0/其它 全部 1 即将过期 2 正常 + if status == -1 { + filterSql += "and end_time <= '" + nowStr + "'" + } else if status == 1 { + filterSql += "and end_time > '" + nowStr + "' AND end_time <= '" + nowPlus30DaysStr + "'" + } else if status == 2 { + filterSql += "and end_time > '" + nowPlus30DaysStr + "'" } + + if search != "" { + filterSql += "and domains like '%" + search + "%'" + } + count, err = s.Where(filterSql, []interface{}{}).Count() + data, err = s.Where(filterSql, []interface{}{}).Order("end_time", "esc").Limit(limits).Select() + if err != nil { return data, 0, err } @@ -170,7 +187,7 @@ func DelCert(id string) error { } defer s.Close() - _, err = s.Where("id=?", []interface{}{id}).Delete() + _, err = s.Where("id in (?)", []interface{}{id}).Delete() if err != nil { return err } diff --git a/backend/internal/cert/deploy/plugin/plugin.go b/backend/internal/cert/deploy/plugin/plugin.go index 266f4f6..e058875 100644 --- a/backend/internal/cert/deploy/plugin/plugin.go +++ b/backend/internal/cert/deploy/plugin/plugin.go @@ -18,20 +18,28 @@ var ( pluginRegistry = map[string]PluginMetadata{} ) +type ConfigParam struct { + Name string `json:"name"` + Type string `json:"type"` // 数据类型:string/number/boolean/enum + Description string `json:"description"` + Required bool `json:"required"` + Options []map[string]any `json:"options,omitempty"` // 可选枚举值 +} + type ActionInfo struct { - Name string `json:"name"` - Description string `json:"description"` - Params map[string]any `json:"params,omitempty"` // 可选参数 + Name string `json:"name"` + Description string `json:"description"` + Params []ConfigParam `json:"params,omitempty"` // 可选参数 } type PluginMetadata struct { - Name string `json:"name"` - Description string `json:"description"` - Version string `json:"version"` - Author string `json:"author"` - Actions []ActionInfo `json:"actions"` - Config map[string]any `json:"config,omitempty"` // 可选配置 - Path string // 插件路径 + Name string `json:"name"` + Description string `json:"description"` + Version string `json:"version"` + Author string `json:"author"` + Actions []ActionInfo `json:"actions"` + Config []ConfigParam `json:"config,omitempty"` // 可选配置 + Path string // 插件路径 } type Request struct { @@ -54,7 +62,7 @@ func scanPlugins(dir string) ([]PluginMetadata, error) { } meta, err := getMetadata(path) if err != nil { - fmt.Println("插件无效:", path, "错误:", err) + //fmt.Println("插件无效:", path, "错误:", err) return nil } meta.Path = path @@ -89,6 +97,83 @@ func getMetadata(path string) (PluginMetadata, error) { var meta PluginMetadata raw, _ := json.Marshal(resp.Result) if err := json.Unmarshal(raw, &meta); err != nil { + var metaMap map[string]any + if err := json.Unmarshal(raw, &metaMap); err == nil { + + name, ok := metaMap["name"].(string) + if !ok || name == "" { + return PluginMetadata{}, fmt.Errorf("元数据缺失字段: name") + } + meta.Name = name + description, ok := metaMap["description"].(string) + if !ok || description == "" { + return PluginMetadata{}, fmt.Errorf("元数据缺失字段: description") + } + meta.Description = description + version, ok := metaMap["version"].(string) + if !ok || version == "" { + return PluginMetadata{}, fmt.Errorf("元数据缺失字段: version") + } + meta.Version = version + author, ok := metaMap["author"].(string) + if !ok || author == "" { + return PluginMetadata{}, fmt.Errorf("元数据缺失字段: author") + } + meta.Author = author + + metaMapConfig, ok := metaMap["config"].(map[string]any) + if !ok { + return PluginMetadata{}, fmt.Errorf("元数据缺失字段: config") + } + config := ConfigParam{ + Type: "string", + Required: true, + } + // 遍历 map 键值对 + for key, value := range metaMapConfig { + config.Name = key + config.Description = value.(string) + meta.Config = append(meta.Config, config) + } + actions, ok := metaMap["actions"].([]any) + if !ok || len(actions) == 0 { + return PluginMetadata{}, fmt.Errorf("元数据缺失字段: actions") + } + for _, a := range actions { + actionMap, ok := a.(map[string]any) + if !ok { + return PluginMetadata{}, fmt.Errorf("元数据 actions 格式错误") + } + action := ActionInfo{} + name, ok := actionMap["name"].(string) + if !ok || name == "" { + return PluginMetadata{}, fmt.Errorf("元数据缺失字段: action.name") + } + action.Name = name + description, ok := actionMap["description"].(string) + if !ok || description == "" { + return PluginMetadata{}, fmt.Errorf("元数据缺失字段: action.description") + } + action.Description = description + + paramsMap, ok := actionMap["params"].(map[string]any) + if ok { + for key, value := range paramsMap { + param := ConfigParam{ + Name: key, + Type: "string", + Description: value.(string), + Required: true, + } + action.Params = append(action.Params, param) + } + } + meta.Actions = append(meta.Actions, action) + return meta, nil + } + } else { + fmt.Println(err) + } return PluginMetadata{}, fmt.Errorf("元数据解析失败: %w", err) } @@ -99,6 +184,37 @@ func getMetadata(path string) (PluginMetadata, error) { return meta, nil } +// GetPluginRawMetadata 获取原始元数据 +func GetPluginRawMetadata(name string) (map[string]interface{}, error) { + plugin, ok := pluginRegistry[name] + if !ok { + return nil, ErrPluginNotFound + } + path := plugin.Path + + req := Request{Action: "get_metadata"} + data, _ := json.Marshal(req) + + cmd := exec.Command(path) + cmd.Stdin = bytes.NewReader(data) + var out bytes.Buffer + cmd.Stdout = &out + + if err := cmd.Run(); err != nil { + return nil, fmt.Errorf("运行失败: %w", err) + } + + var resp Response + if err := json.Unmarshal(out.Bytes(), &resp); err != nil { + return nil, fmt.Errorf("输出无效: %w", err) + } + if resp.Status != "success" { + return nil, fmt.Errorf("插件响应错误: %s", resp.Message) + } + + return resp.Result, nil +} + func CallPlugin(name, action string, params map[string]interface{}, logger *public.Logger) (*Response, error) { // 第一次尝试 resp, err := tryCallPlugin(name, action, params, logger) diff --git a/backend/internal/cert/deploy/tencentcloud.go b/backend/internal/cert/deploy/tencentcloud.go index 313bc5a..05f8fa6 100644 --- a/backend/internal/cert/deploy/tencentcloud.go +++ b/backend/internal/cert/deploy/tencentcloud.go @@ -79,7 +79,7 @@ func DeployToTX(cfg map[string]any) error { if err != nil { return err } - region := "" + region := "ap-beijing" if r, ok := cfg["region"].(string); ok { region = r } @@ -117,10 +117,6 @@ func DeployToTX(cfg map[string]any) error { if !ok { return fmt.Errorf("参数错误:domain") } - region, ok := cfg["region"].(string) - if !ok { - return fmt.Errorf("参数错误:region") - } bucket, ok := cfg["bucket"].(string) if !ok { return fmt.Errorf("参数错误:bucket") diff --git a/backend/internal/setting/setting.go b/backend/internal/setting/setting.go index 4af0ef9..43e5f92 100644 --- a/backend/internal/setting/setting.go +++ b/backend/internal/setting/setting.go @@ -193,20 +193,17 @@ func Restart() { } func GetVersion() (map[string]string, error) { - version := "v1.1.1" + version := "v1.1.2" update := "0" - newVersionObj, err := http.Get("https://download.allinssl.com/version.json") + newVersionObj, err := http.Get("https://allinssl.bt.com/version.json") if err != nil { - newVersionObj, err = http.Get("https://node1.allinssl.com/version.json") - if err != nil { - return map[string]string{ - "version": version, - "new_version": version, - "update": update, - "log": "", - "date": "", - }, nil - } + return map[string]string{ + "version": version, + "new_version": version, + "update": update, + "log": "", + "date": "", + }, nil } defer newVersionObj.Body.Close() diff --git a/backend/route/route.go b/backend/route/route.go index 3bd4841..d385173 100644 --- a/backend/route/route.go +++ b/backend/route/route.go @@ -67,6 +67,7 @@ func Register(r *gin.Engine) { // 插件先放这里 access.POST("/get_plugin_actions", api.GetPluginActions) access.POST("/get_plugins", api.GetPlugins) + access.POST("/get_plugin_raw_metadata", api.GetPluginRawMetadata) } // acme账户 acmeAccount := v1.Group("/acme_account") diff --git a/backend/server/server.go b/backend/server/server.go index 8dec339..739f4e9 100644 --- a/backend/server/server.go +++ b/backend/server/server.go @@ -7,11 +7,14 @@ import ( "context" "crypto/tls" "encoding/gob" + "fmt" "github.com/gin-contrib/gzip" "github.com/gin-contrib/sessions" "github.com/gin-contrib/sessions/memstore" "github.com/gin-gonic/gin" + "github.com/tjfoc/gmsm/gmtls" "net/http" + "os" "time" ) @@ -54,7 +57,45 @@ func RunServer(ctx context.Context, r *gin.Engine) error { defer close(errchan) err := srv.ListenAndServeTLS("data/https/cert.pem", "data/https/key.pem") if err != nil { - errchan <- err + // 读取 SM2 证书和密钥(PEM 格式) + certPem, err := os.ReadFile("data/https/cert.pem") + midCertPem, err := os.ReadFile("data/https/mid_cert.pem") + + keyPem, err := os.ReadFile("data/https/key.pem") + midKeyPem, err := os.ReadFile("data/https/mid_key.pem") + + tlsCert, err := gmtls.X509KeyPair(certPem, keyPem) + midcert, err := gmtls.X509KeyPair(midCertPem, midKeyPem) + if err != nil { + errchan <- fmt.Errorf("无法加载国密证书和私钥: %v", err) + return + } + + tlsConfig := &gmtls.Config{ + Certificates: []gmtls.Certificate{tlsCert, midcert}, // 使用国密证书和加密证书 + MinVersion: gmtls.VersionGMSSL, + MaxVersion: gmtls.VersionGMSSL, + GMSupport: &gmtls.GMSupport{ + WorkMode: gmtls.ModeGMSSLOnly, + }, // 启用 GM/T 0024 协议 + CipherSuites: []uint16{ + gmtls.GMTLS_SM2_WITH_SM4_SM3, // 明确指定国密套件 + }, + GetConfigForClient: func(chi *gmtls.ClientHelloInfo) (*gmtls.Config, error) { + fmt.Printf("客户端 Hello 协议版本: %x, 支持 cipher suites: %+v\n", chi.SupportedVersions, chi.CipherSuites) + return nil, nil + }, + } + //srv.TLSConfig = tlsConfig + ln, err := gmtls.Listen("tcp", ":"+public.Port, tlsConfig) + if err != nil { + errchan <- fmt.Errorf("无法启动国密 HTTPS 服务器: %v", err) + return + } + err = http.Serve(ln, r) + if err != nil { + errchan <- err + } } }() } else { diff --git a/go.mod b/go.mod index 272585c..5129030 100644 --- a/go.mod +++ b/go.mod @@ -5,26 +5,26 @@ go 1.24.0 //toolchain go1.24.6 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 github.com/alibabacloud-go/cas-20200407/v4 v4.0.0 github.com/alibabacloud-go/cdn-20180510/v6 v6.0.0 - github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.8 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12 github.com/alibabacloud-go/dcdn-20180115/v3 v3.5.0 github.com/alibabacloud-go/esa-20240910/v2 v2.34.0 github.com/alibabacloud-go/market-20151101/v4 v4.1.0 github.com/alibabacloud-go/openapi-util v0.1.1 - github.com/alibabacloud-go/tea v1.3.9 + github.com/alibabacloud-go/tea v1.3.12 github.com/alibabacloud-go/tea-utils/v2 v2.0.7 github.com/alibabacloud-go/waf-openapi-20211001/v5 v5.1.2 github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible - github.com/baidubce/bce-sdk-go v0.9.235 + github.com/baidubce/bce-sdk-go v0.9.243 github.com/gin-contrib/gzip v1.2.3 github.com/gin-contrib/sessions v1.0.3 github.com/gin-gonic/gin v1.10.0 - github.com/go-acme/lego/v4 v4.25.2 + github.com/go-acme/lego/v4 v4.26.0 github.com/go-resty/resty/v2 v2.16.5 github.com/google/uuid v1.6.0 - github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.159 + github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.168 github.com/jdcloud-api/jdcloud-sdk-go v1.64.0 github.com/joho/godotenv v1.5.1 github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible @@ -34,18 +34,18 @@ require ( github.com/pkg/sftp v1.13.9 github.com/qiniu/go-sdk/v7 v7.25.3 github.com/tealeg/xlsx v1.0.5 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1210 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.26 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1124 github.com/tjfoc/gmsm v1.4.1 github.com/volcengine/volcengine-go-sdk v1.1.11 - golang.org/x/crypto v0.40.0 + golang.org/x/crypto v0.42.0 modernc.org/sqlite v1.37.0 - software.sslmate.com/src/go-pkcs12 v0.5.0 + software.sslmate.com/src/go-pkcs12 v0.6.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.11.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0 // indirect @@ -60,38 +60,41 @@ require ( github.com/alibabacloud-go/tea-oss-utils v1.1.0 // indirect github.com/alibabacloud-go/tea-utils v1.4.5 // indirect github.com/alibabacloud-go/tea-xml v1.1.3 // indirect - github.com/aliyun/credentials-go v1.4.6 // indirect - github.com/aws/aws-sdk-go-v2 v1.36.6 // indirect - github.com/aws/aws-sdk-go-v2/config v1.29.18 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.71 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.33 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37 // indirect + github.com/aliyun/credentials-go v1.4.7 // indirect + github.com/aws/aws-sdk-go-v2 v1.39.0 // indirect + github.com/aws/aws-sdk-go-v2/config v1.31.8 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.18.12 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18 // indirect - github.com/aws/aws-sdk-go-v2/service/route53 v1.53.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.25.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.34.1 // indirect - github.com/aws/smithy-go v1.22.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7 // indirect + github.com/aws/aws-sdk-go-v2/service/route53 v1.58.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.29.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.38.4 // indirect + github.com/aws/smithy-go v1.23.0 // indirect github.com/bytedance/sonic v1.13.2 // indirect github.com/bytedance/sonic/loader v0.2.4 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/clbanning/mxj/v2 v2.7.0 // indirect github.com/cloudwego/base64x v0.1.5 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/gin-contrib/sse v1.0.0 // indirect - github.com/go-acme/alidns-20150109/v4 v4.5.10 // indirect - github.com/go-acme/tencentclouddnspod v1.0.1208 // indirect - github.com/go-jose/go-jose/v4 v4.1.1 // indirect + github.com/go-acme/alidns-20150109/v4 v4.6.0 // indirect + github.com/go-acme/tencentclouddnspod v1.1.10 // indirect + github.com/go-acme/tencentedgdeone v1.1.19 // indirect + github.com/go-jose/go-jose/v4 v4.1.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.26.0 // indirect github.com/goccy/go-json v0.10.5 // indirect + github.com/goccy/go-yaml v1.9.8 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect - github.com/golang-jwt/jwt/v5 v5.2.2 // indirect + github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/gorilla/context v1.1.2 // indirect @@ -100,20 +103,21 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.8 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect + github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/kr/fs v0.1.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/miekg/dns v1.1.67 // indirect + github.com/miekg/dns v1.1.68 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/namedotcom/go/v4 v4.0.2 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect github.com/nrdcg/bunny-go v0.0.0-20250327222614-988a091fc7ea // indirect github.com/nrdcg/mailinabox v0.2.0 // indirect - github.com/nrdcg/namesilo v0.2.1 // indirect + github.com/nrdcg/namesilo v0.5.0 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect @@ -124,21 +128,22 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - github.com/volcengine/volc-sdk-golang v1.0.216 // indirect + github.com/volcengine/volc-sdk-golang v1.0.219 // indirect go.mongodb.org/mongo-driver v1.17.3 // indirect golang.org/x/arch v0.16.0 // indirect golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect golang.org/x/image v0.23.0 // indirect - golang.org/x/mod v0.25.0 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.34.0 // indirect - google.golang.org/protobuf v1.36.6 // indirect + golang.org/x/mod v0.27.0 // indirect + golang.org/x/net v0.44.0 // indirect + golang.org/x/sync v0.17.0 // indirect + golang.org/x/sys v0.36.0 // indirect + golang.org/x/text v0.29.0 // indirect + golang.org/x/time v0.13.0 // indirect + golang.org/x/tools v0.36.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/protobuf v1.36.8 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/ns1/ns1-go.v2 v2.14.4 // indirect + gopkg.in/ns1/ns1-go.v2 v2.15.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.62.1 // indirect diff --git a/go.sum b/go.sum index fa19858..b314668 100644 --- a/go.sum +++ b/go.sum @@ -32,14 +32,14 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 h1:Wc1ml6QlJs2BHQ/9Bqu1jiyggbsSjramq2oUmp5WeIo= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 h1:B+blDbyVIG3WaikNxPnhPiJ1MThR03b3vKGtER95TP4= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1/go.mod h1:JdM5psgjfBf5fo2uWOZhflPWyDBZ/O/CNAH9CtsuZE4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 h1:5YTBM8QDVIBN3sxBil89WfdAAqDZbyJTgh688DSxX5w= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.11.0 h1:MhRfI58HblXzCtWEZCO0feHs8LweePB3s90r7WaR1KU= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.11.0/go.mod h1:okZ+ZURbArNdlJ+ptXoyHNuOETzOl1Oww19rm8I2WLA= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 h1:lpOxwrQ919lCZoNCd69rVt8u1eLZuMORrGXqy8sNf3c= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0/go.mod h1:fSvRkb8d26z9dbL40Uf/OO6Vo9iExtZK3D0ulRV+8M0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0 h1:2qsIIvxVT+uE6yrNldntJKlLRgxGbZ85kgtz5SNBhMw= @@ -95,8 +95,9 @@ github.com/alibabacloud-go/darabonba-map v0.0.2/go.mod h1:28AJaX8FOE/ym8OUFWga+M github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.0/go.mod h1:5JHVmnHvGzR2wNdgaW1zDLQG8kOC4Uec8ubkMogW7OQ= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10/go.mod h1:26a14FGhZVELuz2cc2AolvW4RHmIO3/HRwsdHhaIPDE= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.11/go.mod h1:wHxkgZT1ClZdcwEVP/pDgYK/9HucsnCfMipmJgCz4xY= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.8 h1:AL+nH363NJFS1NXIjCdmj5MOElgKEqgFeoq7vjje350= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.8/go.mod h1:d+z3ScRqc7PFzg4h9oqE3h8yunRZvAvU7u+iuPYEhpU= +github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.11/go.mod h1:ue0+WkdPxpCB2JP3iaG4Iawayxp72kyT5uDbozQKaW8= +github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12 h1:e2yCrhtWd6Qcsy4he2OL+jIAU+93Lx9OcLlPRoFLT1w= +github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12/go.mod h1:f2wDpbM7hK9SvLIH09zSKVU1TsyemUNOqErMscMMl7c= github.com/alibabacloud-go/darabonba-signature-util v0.0.7 h1:UzCnKvsjPFzApvODDNEYqBHMFt1w98wC7FOo0InLyxg= github.com/alibabacloud-go/darabonba-signature-util v0.0.7/go.mod h1:oUzCYV2fcCH797xKdL6BDH8ADIHlzrtKVjeRtunBNTQ= github.com/alibabacloud-go/darabonba-string v1.0.2 h1:E714wms5ibdzCqGeYJ9JCFywE5nDyvIXIIQbZVFkkqo= @@ -129,8 +130,9 @@ github.com/alibabacloud-go/tea v1.1.17/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy github.com/alibabacloud-go/tea v1.1.19/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A= github.com/alibabacloud-go/tea v1.1.20/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A= github.com/alibabacloud-go/tea v1.2.2/go.mod h1:CF3vOzEMAG+bR4WOql8gc2G9H3EkH3ZLAQdpmpXMgwk= -github.com/alibabacloud-go/tea v1.3.9 h1:bjgt1bvdY780vz/17iWNNtbXl4A77HWntWMeaUF3So0= -github.com/alibabacloud-go/tea v1.3.9/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg= +github.com/alibabacloud-go/tea v1.3.11/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg= +github.com/alibabacloud-go/tea v1.3.12 h1:ir2Io80UlBy1JHf7t+uCTxmaGQtiEta1WpV29NGJTkE= +github.com/alibabacloud-go/tea v1.3.12/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg= github.com/alibabacloud-go/tea-fileform v1.1.1 h1:1YG6erAP3joQ0XdCXYIotuD7zyOM6qCR49xkp5FZDeU= github.com/alibabacloud-go/tea-fileform v1.1.1/go.mod h1:ZeCV91o4ISmxidd686f0ebdS5EDHWU+vW+TkjLhrsFE= github.com/alibabacloud-go/tea-oss-sdk v1.1.3/go.mod h1:yUnodpR3Bf2rudLE7V/Gft5txjJF30Pk+hH77K/Eab0= @@ -160,8 +162,9 @@ github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTs github.com/aliyun/credentials-go v1.3.6/go.mod h1:1LxUuX7L5YrZUWzBrRyk0SwSdH4OmPrib8NVePL3fxM= github.com/aliyun/credentials-go v1.3.10/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= github.com/aliyun/credentials-go v1.4.5/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= -github.com/aliyun/credentials-go v1.4.6 h1:CG8rc/nxCNKfXbZWpWDzI9GjF4Tuu3Es14qT8Y0ClOk= github.com/aliyun/credentials-go v1.4.6/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= +github.com/aliyun/credentials-go v1.4.7 h1:T17dLqEtPUFvjDRRb5giVvLh6dFT8IcNFJJb7MeyCxw= +github.com/aliyun/credentials-go v1.4.7/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -171,38 +174,38 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2 v1.36.6 h1:zJqGjVbRdTPojeCGWn5IR5pbJwSQSBh5RWFTQcEQGdU= -github.com/aws/aws-sdk-go-v2 v1.36.6/go.mod h1:EYrzvCCN9CMUTa5+6lf6MM4tq3Zjp8UhSGR/cBsjai0= -github.com/aws/aws-sdk-go-v2/config v1.29.18 h1:x4T1GRPnqKV8HMJOMtNktbpQMl3bIsfx8KbqmveUO2I= -github.com/aws/aws-sdk-go-v2/config v1.29.18/go.mod h1:bvz8oXugIsH8K7HLhBv06vDqnFv3NsGDt2Znpk7zmOU= -github.com/aws/aws-sdk-go-v2/credentials v1.17.71 h1:r2w4mQWnrTMJjOyIsZtGp3R3XGY3nqHn8C26C2lQWgA= -github.com/aws/aws-sdk-go-v2/credentials v1.17.71/go.mod h1:E7VF3acIup4GB5ckzbKFrCK0vTvEQxOxgdq4U3vcMCY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.33 h1:D9ixiWSG4lyUBL2DDNK924Px9V/NBVpML90MHqyTADY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.33/go.mod h1:caS/m4DI+cij2paz3rtProRBI4s/+TCiWoaWZuQ9010= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37 h1:osMWfm/sC/L4tvEdQ65Gri5ZZDCUpuYJZbTTDrsn4I0= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37/go.mod h1:ZV2/1fbjOPr4G4v38G3Ww5TBT4+hmsK45s/rxu1fGy0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37 h1:v+X21AvTb2wZ+ycg1gx+orkB/9U6L7AOp93R7qYxsxM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37/go.mod h1:G0uM1kyssELxmJ2VZEfG0q2npObR3BAkF3c1VsfVnfs= +github.com/aws/aws-sdk-go-v2 v1.39.0 h1:xm5WV/2L4emMRmMjHFykqiA4M/ra0DJVSWUkDyBjbg4= +github.com/aws/aws-sdk-go-v2 v1.39.0/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= +github.com/aws/aws-sdk-go-v2/config v1.31.8 h1:kQjtOLlTU4m4A64TsRcqwNChhGCwaPBt+zCQt/oWsHU= +github.com/aws/aws-sdk-go-v2/config v1.31.8/go.mod h1:QPpc7IgljrKwH0+E6/KolCgr4WPLerURiU592AYzfSY= +github.com/aws/aws-sdk-go-v2/credentials v1.18.12 h1:zmc9e1q90wMn8wQbjryy8IwA6Q4XlaL9Bx2zIqdNNbk= +github.com/aws/aws-sdk-go-v2/credentials v1.18.12/go.mod h1:3VzdRDR5u3sSJRI4kYcOSIBbeYsgtVk7dG5R/U6qLWY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7 h1:Is2tPmieqGS2edBnmOJIbdvOA6Op+rRpaYR60iBAwXM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7/go.mod h1:F1i5V5421EGci570yABvpIXgRIBPb5JM+lSkHF6Dq5w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 h1:UCxq0X9O3xrlENdKf1r9eRJoKz/b0AfGkpp3a7FPlhg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7/go.mod h1:rHRoJUNUASj5Z/0eqI4w32vKvC7atoWR0jC+IkmVH8k= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 h1:Y6DTZUn7ZUC4th9FMBbo8LVE+1fyq3ofw+tRwkUd3PY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7/go.mod h1:x3XE6vMnU9QvHN/Wrx2s44kwzV2o2g5x/siw4ZUJ9g8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 h1:CXV68E2dNqhuynZJPB80bhPQwAKqBWVer887figW6Jc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4/go.mod h1:/xFi9KtvBXP97ppCz1TAEvU1Uf66qvid89rbem3wCzQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18 h1:vvbXsA2TVO80/KT7ZqCbx934dt6PY+vQ8hZpUZ/cpYg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18/go.mod h1:m2JJHledjBGNMsLOF1g9gbAxprzq3KjC8e4lxtn+eWg= -github.com/aws/aws-sdk-go-v2/service/route53 v1.53.1 h1:R3nSX1hguRy6MnknHiepSvqnnL8ansFwK2hidPesAYU= -github.com/aws/aws-sdk-go-v2/service/route53 v1.53.1/go.mod h1:fmSiB4OAghn85lQgk7XN9l9bpFg5Bm1v3HuaXKytPEw= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.6 h1:rGtWqkQbPk7Bkwuv3NzpE/scwwL9sC1Ul3tn9x83DUI= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.6/go.mod h1:u4ku9OLv4TO4bCPdxf4fA1upaMaJmP9ZijGk3AAOC6Q= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.4 h1:OV/pxyXh+eMA0TExHEC4jyWdumLxNbzz1P0zJoezkJc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.4/go.mod h1:8Mm5VGYwtm+r305FfPSuc+aFkrypeylGYhFim6XEPoc= -github.com/aws/aws-sdk-go-v2/service/sts v1.34.1 h1:aUrLQwJfZtwv3/ZNG2xRtEen+NqI3iesuacjP51Mv1s= -github.com/aws/aws-sdk-go-v2/service/sts v1.34.1/go.mod h1:3wFBZKoWnX3r+Sm7in79i54fBmNfwhdNdQuscCw7QIk= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7 h1:mLgc5QIgOy26qyh5bvW+nDoAppxgn3J2WV3m9ewq7+8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7/go.mod h1:wXb/eQnqt8mDQIQTTmcw58B5mYGxzLGZGK8PWNFZ0BA= +github.com/aws/aws-sdk-go-v2/service/route53 v1.58.2 h1:uqxTxY0i8b1ZFHxIf6pZYpUCOuYV/xxcgTv0vDz8Iig= +github.com/aws/aws-sdk-go-v2/service/route53 v1.58.2/go.mod h1:py/7C8W37SHqyHk6tkvZKiFDvMA/WkfPv5Qd8dUXYQw= +github.com/aws/aws-sdk-go-v2/service/sso v1.29.3 h1:7PKX3VYsZ8LUWceVRuv0+PU+E7OtQb1lgmi5vmUE9CM= +github.com/aws/aws-sdk-go-v2/service/sso v1.29.3/go.mod h1:Ql6jE9kyyWI5JHn+61UT/Y5Z0oyVJGmgmJbZD5g4unY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.4 h1:e0XBRn3AptQotkyBFrHAxFB8mDhAIOfsG+7KyJ0dg98= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.4/go.mod h1:XclEty74bsGBCr1s0VSaA11hQ4ZidK4viWK7rRfO88I= +github.com/aws/aws-sdk-go-v2/service/sts v1.38.4 h1:PR00NXRYgY4FWHqOGx3fC3lhVKjsp1GdloDv2ynMSd8= +github.com/aws/aws-sdk-go-v2/service/sts v1.38.4/go.mod h1:Z+Gd23v97pX9zK97+tX4ppAgqCt3Z2dIXB02CtBncK8= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aws/smithy-go v1.22.4 h1:uqXzVZNuNexwc/xrh6Tb56u89WDlJY6HS+KC0S4QSjw= -github.com/aws/smithy-go v1.22.4/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= -github.com/baidubce/bce-sdk-go v0.9.235 h1:iAi+seH9w1Go2szFNzyGumahLGDsuYZ3i8hduX3qiM8= -github.com/baidubce/bce-sdk-go v0.9.235/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg= +github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE= +github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/baidubce/bce-sdk-go v0.9.243 h1:6/yb519gFiABE6U1qbVZzBmEonfEGj5qcXrmIkbkFyQ= +github.com/baidubce/bce-sdk-go v0.9.243/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -219,12 +222,9 @@ github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -250,8 +250,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= @@ -269,6 +267,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= @@ -291,17 +290,19 @@ github.com/gin-contrib/sse v1.0.0 h1:y3bT1mUWUxDpW4JLQg/HnTqV4rozuW4tC9eFKTxYI9E github.com/gin-contrib/sse v1.0.0/go.mod h1:zNuFdwarAygJBht0NTKiSi3jRf6RbqeILZ9Sp6Slhe0= github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= -github.com/go-acme/alidns-20150109/v4 v4.5.10 h1:epLD0VaHR5XUpiM6mjm4MzQFICrk+zpuqDz2aO1/R/k= -github.com/go-acme/alidns-20150109/v4 v4.5.10/go.mod h1:qGRq8kD0xVgn82qRSQmhHwh/oWxKRjF4Db5OI4ScV5g= -github.com/go-acme/lego/v4 v4.25.2 h1:+D1Q+VnZrD+WJdlkgUEGHFFTcDrwGlE7q24IFtMmHDI= -github.com/go-acme/lego/v4 v4.25.2/go.mod h1:OORYyVNZPaNdIdVYCGSBNRNZDIjhQbPuFxwGDgWj/yM= -github.com/go-acme/tencentclouddnspod v1.0.1208 h1:xAVy1lmg2KcKKeYmFSBQUttwc1o1S++9QTjAotGC+BM= -github.com/go-acme/tencentclouddnspod v1.0.1208/go.mod h1:yxG02mkbbVd7lTb97nOn7oj09djhm7hAwxNQw4B9dpQ= +github.com/go-acme/alidns-20150109/v4 v4.6.0 h1:1w0AZXlroykumr83vfxdYcM8L8bFWkV6SbqhxElzT4w= +github.com/go-acme/alidns-20150109/v4 v4.6.0/go.mod h1:qCK/gDRcJZrr5D8OIWuUugECsrdrJZnLXjWF7Mqi91g= +github.com/go-acme/lego/v4 v4.26.0 h1:521aEQxNstXvPQcFDDPrJiFfixcCQuvAvm35R4GbyYA= +github.com/go-acme/lego/v4 v4.26.0/go.mod h1:BQVAWgcyzW4IT9eIKHY/RxYlVhoyKyOMXOkq7jK1eEQ= +github.com/go-acme/tencentclouddnspod v1.1.10 h1:ERVJ4mc3cT4Nb3+n6H/c1AwZnChGBqLoymE0NVYscKI= +github.com/go-acme/tencentclouddnspod v1.1.10/go.mod h1:Bo/0YQJ/99FM+44HmCQkByuptX1tJsJ9V14MGV/2Qco= +github.com/go-acme/tencentedgdeone v1.1.19 h1:1jdEpMITrDuXHnu7QLOy2hpLW0BlDof70/KuRT+EiTo= +github.com/go-acme/tencentedgdeone v1.1.19/go.mod h1:gpu7HvXfcKWBrq5HAEBowZNkdk7JFPkagRzC/infUY0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v4 v4.1.1 h1:JYhSgy4mXXzAdF3nUx3ygx347LRXJRrpgyU3adRmkAI= -github.com/go-jose/go-jose/v4 v4.1.1/go.mod h1:BdsZGqgdO3b6tTc6LSE56wcDbMMLuPsw5d4ZD5f94kA= +github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI= +github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= @@ -322,6 +323,7 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-playground/validator/v10 v10.7.0/go.mod h1:xm76BBt941f7yWdGnI2DVPFFg1UK3YY04qifoXU3lOk= github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k= github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= @@ -332,6 +334,8 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78 github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.9.8 h1:5gMyLUeU1/6zl+WFfR1hN7D2kf+1/eRGa7DFtToiBvQ= +github.com/goccy/go-yaml v1.9.8/go.mod h1:JubOolP3gh0HpiBc4BLRD4YmjEjHAmIIB2aaXKkTfoE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= @@ -339,8 +343,8 @@ github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= -github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -392,7 +396,6 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -465,8 +468,8 @@ github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.159 h1:6LZysc4iyO4cHB1aJsRklWfSEJr8CEhW7BmcM0SkYcU= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.159/go.mod h1:Y/+YLCFCJtS29i2MbYPTUlNNfwXvkzEsZKR0imY/2aY= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.168 h1:CQcnff1kIag7rq12IcdTsF0xIW6WJoUx4MqNnDib420= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.168/go.mod h1:M+yna96Fx9o5GbIUnF3OvVvQGjgfVSyeJbV9Yb1z/wI= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -493,8 +496,9 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12 h1:9Nu54bhS/H/Kgo2/7xNSUuC5G28VR8ljfrLKU2G4IjU= +github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12/go.mod h1:TBzl5BIHNXfS9+C35ZyJaklL7mLDbgUkcgXzSLa8Tk0= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -544,14 +548,15 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.67 h1:kg0EHj0G4bfT5/oOys6HhZw4vmMlnoZ+gDu8tJ/AlI0= -github.com/miekg/dns v1.1.67/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps= +github.com/miekg/dns v1.1.68 h1:jsSRkNozw7G/mnmXULynzMNIsgY2dHC8LO6U6Ij2JEA= +github.com/miekg/dns v1.1.68/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= @@ -590,8 +595,8 @@ github.com/nrdcg/bunny-go v0.0.0-20250327222614-988a091fc7ea h1:OSgRS4kqOs/WuxuF github.com/nrdcg/bunny-go v0.0.0-20250327222614-988a091fc7ea/go.mod h1:IDRRngAngb2eTEaWgpO0hukQFI/vJId46fT1KErMytA= github.com/nrdcg/mailinabox v0.2.0 h1:IKq8mfKiVwNW2hQii/ng1dJ4yYMMv3HAP3fMFIq2CFk= github.com/nrdcg/mailinabox v0.2.0/go.mod h1:0yxqeYOiGyxAu7Sb94eMxHPIOsPYXAjTeA9ZhePhGnc= -github.com/nrdcg/namesilo v0.2.1 h1:kLjCjsufdW/IlC+iSfAqj0iQGgKjlbUUeDJio5Y6eMg= -github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= +github.com/nrdcg/namesilo v0.5.0 h1:6QNxT/XxE+f5B+7QlfWorthNzOzcGlBLRQxqi6YeBrE= +github.com/nrdcg/namesilo v0.5.0/go.mod h1:4UkwlwQfDt74kSGmhLaDylnBrD94IfflnpoEaj6T2qw= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -657,8 +662,6 @@ github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b h1:aUNXCGgukb4gtY github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI= -github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -670,6 +673,7 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -697,18 +701,20 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE= github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1124/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1208/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1210 h1:waSk2KyI2VvXtR+XQJm0v1lWfgbJg51iSWJh4hWnyeo= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1210/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.10/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.19/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.26 h1:h8/jVLNbsLFQczGX6NDp1GcJahA81ytDj9R/wrq0i8k= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.26/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1124 h1:LQKAlxFb0sYiE8ojK5h9+seuFzogoJtYnXmiRF+4F4Q= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1124/go.mod h1:tYbK0FbHVG+78od7eZpzczE8qk0JWKO/osTQWuiJ3Fo= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= @@ -727,8 +733,8 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/volcengine/volc-sdk-golang v1.0.23/go.mod h1:AfG/PZRUkHJ9inETvbjNifTDgut25Wbkm2QoYBTbvyU= -github.com/volcengine/volc-sdk-golang v1.0.216 h1:+wAq8RvxpGECveRJaAXZFpzrZoQ33WjMuRyd9iY2Oc0= -github.com/volcengine/volc-sdk-golang v1.0.216/go.mod h1:zHJlaqiMbIB+0mcrsZPTwOb3FB7S/0MCfqlnO8R7hlM= +github.com/volcengine/volc-sdk-golang v1.0.219 h1:IqMCdpJ6uuqS2ZZQYUVHKVd+2H1au0NDsSt0wx6hv9k= +github.com/volcengine/volc-sdk-golang v1.0.219/go.mod h1:zHJlaqiMbIB+0mcrsZPTwOb3FB7S/0MCfqlnO8R7hlM= github.com/volcengine/volcengine-go-sdk v1.1.11 h1:TZk2klExlL1hrLp02whgKQ9UTsFjaI+srl3ItjG6ZSY= github.com/volcengine/volcengine-go-sdk v1.1.11/go.mod h1:EyKoi6t6eZxoPNGr2GdFCZti2Skd7MO3eUzx7TtSvNo= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -795,8 +801,8 @@ golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOM golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= +golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -842,8 +848,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= -golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -898,8 +904,8 @@ golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= +golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -923,8 +929,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -984,8 +990,10 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -999,8 +1007,8 @@ golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1015,8 +1023,8 @@ golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= -golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= -golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= +golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ= +golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1034,15 +1042,15 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= -golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI= +golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1097,12 +1105,14 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= -golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= @@ -1192,8 +1202,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1208,8 +1218,8 @@ gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/ns1/ns1-go.v2 v2.14.4 h1:77eP71rZ24I+9k1gITgjJXRyJzzmflA9oPUkYPB/wyc= -gopkg.in/ns1/ns1-go.v2 v2.14.4/go.mod h1:pfaU0vECVP7DIOr453z03HXS6dFJpXdNRwOyRzwmPSc= +gopkg.in/ns1/ns1-go.v2 v2.15.0 h1:cE3xSMdSCV8kf9SQldzqgW/Ueh7sv3yO2JwKtYxxz3E= +gopkg.in/ns1/ns1-go.v2 v2.15.0/go.mod h1:pfaU0vECVP7DIOr453z03HXS6dFJpXdNRwOyRzwmPSc= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1263,5 +1273,5 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -software.sslmate.com/src/go-pkcs12 v0.5.0 h1:EC6R394xgENTpZ4RltKydeDUjtlM5drOYIG9c6TVj2M= -software.sslmate.com/src/go-pkcs12 v0.5.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= +software.sslmate.com/src/go-pkcs12 v0.6.0 h1:f3sQittAeF+pao32Vb+mkli+ZyT+VwKaD014qFGq6oU= +software.sslmate.com/src/go-pkcs12 v0.6.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= diff --git a/plugins/alicloud/action.go b/plugins/alicloud/action.go new file mode 100644 index 0000000..889ea7e --- /dev/null +++ b/plugins/alicloud/action.go @@ -0,0 +1,52 @@ +package main + +import ( + casPkg "ALLinSSL/plugins/alicloud/cas" + cdnPkg "ALLinSSL/plugins/alicloud/cdn" + dcdnPkg "ALLinSSL/plugins/alicloud/dcdn" + esaPkg "ALLinSSL/plugins/alicloud/esa" + ossPkg "ALLinSSL/plugins/alicloud/oss" + wafPkg "ALLinSSL/plugins/alicloud/waf" +) + +func Cdn(cfg map[string]any) (*Response, error) { + if err := cdnPkg.Deploy(cfg); err != nil { + return nil, err + } + return &Response{Status: "success", Message: "OK", Result: nil}, nil +} + +func Dcdn(cfg map[string]any) (*Response, error) { + if err := dcdnPkg.Deploy(cfg); err != nil { + return nil, err + } + return &Response{Status: "success", Message: "OK", Result: nil}, nil +} + +func Oss(cfg map[string]any) (*Response, error) { + if err := ossPkg.Deploy(cfg); err != nil { + return nil, err + } + return &Response{Status: "success", Message: "OK", Result: nil}, nil +} + +func Esa(cfg map[string]any) (*Response, error) { + if err := esaPkg.Deploy(cfg); err != nil { + return nil, err + } + return &Response{Status: "success", Message: "OK", Result: nil}, nil +} + +func Cas(cfg map[string]any) (*Response, error) { + if err := casPkg.Deploy(cfg); err != nil { + return nil, err + } + return &Response{Status: "success", Message: "OK", Result: nil}, nil +} + +func Waf(cfg map[string]any) (*Response, error) { + if err := wafPkg.Deploy(cfg); err != nil { + return nil, err + } + return &Response{Status: "success", Message: "OK", Result: nil}, nil +} diff --git a/plugins/alicloud/cas/action.go b/plugins/alicloud/cas/action.go new file mode 100644 index 0000000..114326c --- /dev/null +++ b/plugins/alicloud/cas/action.go @@ -0,0 +1,65 @@ +package cas + +import ( + "fmt" + + cas "github.com/alibabacloud-go/cas-20200407/v4/client" + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" +) + +func CreateClient(accessKey, accessSecret, endpoint string) (*cas.Client, error) { + if endpoint == "" { + endpoint = "cas.ap-southeast-1.aliyuncs.com" + } + config := &openapi.Config{ + AccessKeyId: tea.String(accessKey), + AccessKeySecret: tea.String(accessSecret), + Endpoint: tea.String(endpoint), + } + return cas.NewClient(config) +} + +func Upload(client *cas.Client, cert, key, name string) error { + req := &cas.UploadUserCertificateRequest{ + Name: tea.String(name), + Cert: tea.String(cert), + Key: tea.String(key), + } + runtime := &util.RuntimeOptions{} + _, err := client.UploadUserCertificateWithOptions(req, runtime) + return err +} + +func Deploy(cfg map[string]any) error { + certPEM, ok := cfg["cert"].(string) + if !ok || certPEM == "" { + return fmt.Errorf("证书错误:cert") + } + keyPEM, ok := cfg["key"].(string) + if !ok || keyPEM == "" { + return fmt.Errorf("证书错误:key") + } + accessKey, ok := cfg["access_key_id"].(string) + if !ok || accessKey == "" { + return fmt.Errorf("参数错误:access_key_id") + } + accessSecret, ok := cfg["access_key_secret"].(string) + if !ok || accessSecret == "" { + return fmt.Errorf("参数错误:access_key_secret") + } + name, _ := cfg["name"].(string) + if name == "" { + name = "allinssl-certificate" + } + endpoint, _ := cfg["endpoint"].(string) + client, err := CreateClient(accessKey, accessSecret, endpoint) + if err != nil { + return err + } + if err := Upload(client, certPEM, keyPEM, name); err != nil { + return err + } + return nil +} diff --git a/plugins/alicloud/cdn/action.go b/plugins/alicloud/cdn/action.go new file mode 100644 index 0000000..88f38d7 --- /dev/null +++ b/plugins/alicloud/cdn/action.go @@ -0,0 +1,58 @@ +package cdn + +import ( + "fmt" + "strings" + + aliyuncdn "github.com/alibabacloud-go/cdn-20180510/v6/client" + aliyunopenapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + "github.com/alibabacloud-go/tea/tea" +) + +func createClient(accessKey, accessSecret string) (*aliyuncdn.Client, error) { + config := &aliyunopenapi.Config{ + AccessKeyId: tea.String(accessKey), + AccessKeySecret: tea.String(accessSecret), + Endpoint: tea.String("cdn.aliyuncs.com"), + } + client, err := aliyuncdn.NewClient(config) + if err != nil { + return nil, err + } + return client, nil +} + +func Deploy(cfg map[string]any) error { + certPEM, ok := cfg["cert"].(string) + if !ok || certPEM == "" { + return fmt.Errorf("证书错误:cert") + } + keyPEM, ok := cfg["key"].(string) + if !ok || keyPEM == "" { + return fmt.Errorf("证书错误:key") + } + accessKey, ok := cfg["access_key_id"].(string) + if !ok || accessKey == "" { + return fmt.Errorf("参数错误:access_key_id") + } + accessSecret, ok := cfg["access_key_secret"].(string) + if !ok || accessSecret == "" { + return fmt.Errorf("参数错误:access_key_secret") + } + domain, ok := cfg["domain"].(string) + if !ok || domain == "" { + return fmt.Errorf("参数错误:domain") + } + client, err := createClient(accessKey, accessSecret) + if err != nil { + return err + } + req := &aliyuncdn.SetCdnDomainSSLCertificateRequest{ + DomainName: tea.String(domain), + SSLProtocol: tea.String("on"), + SSLPub: tea.String(strings.TrimSpace(certPEM)), + SSLPri: tea.String(strings.TrimSpace(keyPEM)), + } + _, err = client.SetCdnDomainSSLCertificate(req) + return err +} diff --git a/plugins/alicloud/dcdn/action.go b/plugins/alicloud/dcdn/action.go new file mode 100644 index 0000000..c4d581e --- /dev/null +++ b/plugins/alicloud/dcdn/action.go @@ -0,0 +1,56 @@ +package dcdn + +import ( + "fmt" + + aliyunopenapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + dcdn "github.com/alibabacloud-go/dcdn-20180115/v3/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" +) + +func createClient(accessKey, accessSecret string) (*dcdn.Client, error) { + config := &aliyunopenapi.Config{ + AccessKeyId: tea.String(accessKey), + AccessKeySecret: tea.String(accessSecret), + RegionId: tea.String("cn-hangzhou"), + } + return dcdn.NewClient(config) +} + +func Deploy(cfg map[string]any) error { + certPEM, ok := cfg["cert"].(string) + if !ok || certPEM == "" { + return fmt.Errorf("证书错误:cert") + } + keyPEM, ok := cfg["key"].(string) + if !ok || keyPEM == "" { + return fmt.Errorf("证书错误:key") + } + accessKey, ok := cfg["access_key_id"].(string) + if !ok || accessKey == "" { + return fmt.Errorf("参数错误:access_key_id") + } + accessSecret, ok := cfg["access_key_secret"].(string) + if !ok || accessSecret == "" { + return fmt.Errorf("参数错误:access_key_secret") + } + domain, ok := cfg["domain"].(string) + if !ok || domain == "" { + return fmt.Errorf("参数错误:domain") + } + client, err := createClient(accessKey, accessSecret) + if err != nil { + return fmt.Errorf("创建 DCDN 客户端失败: %w", err) + } + req := &dcdn.SetDcdnDomainSSLCertificateRequest{ + DomainName: tea.String(domain), + SSLPri: tea.String(keyPEM), + SSLPub: tea.String(certPEM), + SSLProtocol: tea.String("on"), + CertType: tea.String("upload"), + } + runtime := &util.RuntimeOptions{} + _, err = client.SetDcdnDomainSSLCertificateWithOptions(req, runtime) + return err +} diff --git a/plugins/alicloud/esa/action.go b/plugins/alicloud/esa/action.go new file mode 100644 index 0000000..7d0a2a3 --- /dev/null +++ b/plugins/alicloud/esa/action.go @@ -0,0 +1,74 @@ +package esa + +import ( + "fmt" + "strconv" + + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + esa "github.com/alibabacloud-go/esa-20240910/v2/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" +) + +func CreateClient(accessKey, accessSecret string) (*esa.Client, error) { + config := &openapi.Config{ + AccessKeyId: tea.String(accessKey), + AccessKeySecret: tea.String(accessSecret), + Endpoint: tea.String("esa.ap-southeast-1.aliyuncs.com"), + } + return esa.NewClient(config) +} + +func UploadCert(client *esa.Client, siteID int64, certPEM, keyPEM string) error { + req := esa.SetCertificateRequest{ + SiteId: tea.Int64(siteID), + Type: tea.String("upload"), + Certificate: tea.String(certPEM), + PrivateKey: tea.String(keyPEM), + } + runtime := &util.RuntimeOptions{} + _, err := client.SetCertificateWithOptions(&req, runtime) + return err +} + +func Deploy(cfg map[string]any) error { + certPEM, ok := cfg["cert"].(string) + if !ok || certPEM == "" { + return fmt.Errorf("证书错误:cert") + } + keyPEM, ok := cfg["key"].(string) + if !ok || keyPEM == "" { + return fmt.Errorf("证书错误:key") + } + accessKey, ok := cfg["access_key_id"].(string) + if !ok || accessKey == "" { + return fmt.Errorf("参数错误:access_key_id") + } + accessSecret, ok := cfg["access_key_secret"].(string) + if !ok || accessSecret == "" { + return fmt.Errorf("参数错误:access_key_secret") + } + var siteID int64 + switch v := cfg["site_id"].(type) { + case float64: + siteID = int64(v) + case string: + var err error + siteID, err = strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("site_id 格式错误: %w", err) + } + case int: + siteID = int64(v) + default: + return fmt.Errorf("site_id 格式错误") + } + client, err := CreateClient(accessKey, accessSecret) + if err != nil { + return fmt.Errorf("创建 ESA 客户端失败: %w", err) + } + if err := UploadCert(client, siteID, certPEM, keyPEM); err != nil { + return fmt.Errorf("上传证书到 ESA 失败: %w", err) + } + return nil +} diff --git a/plugins/alicloud/main.go b/plugins/alicloud/main.go new file mode 100644 index 0000000..6ed0daf --- /dev/null +++ b/plugins/alicloud/main.go @@ -0,0 +1,105 @@ +package main + +import ( + _ "embed" + "encoding/json" + "fmt" + "io" + "os" +) + +//go:embed metadata.json +var metadataJSON []byte + +var pluginMeta map[string]interface{} + +func init() { + if err := json.Unmarshal(metadataJSON, &pluginMeta); err != nil { + panic(fmt.Sprintf("解析元数据失败: %v", err)) + } +} + +type Request struct { + Action string `json:"action"` + Params map[string]interface{} `json:"params"` +} + +type Response struct { + Status string `json:"status"` + Message string `json:"message"` + Result map[string]interface{} `json:"result"` +} + +func outputJSON(resp *Response) { + _ = json.NewEncoder(os.Stdout).Encode(resp) +} + +func outputError(msg string, err error) { + outputJSON(&Response{ + Status: "error", + Message: fmt.Sprintf("%s: %v", msg, err), + }) +} + +func main() { + var req Request + input, err := io.ReadAll(os.Stdin) + if err != nil { + outputError("读取输入失败", err) + return + } + if err := json.Unmarshal(input, &req); err != nil { + outputError("解析请求失败", err) + return + } + switch req.Action { + case "get_metadata": + outputJSON(&Response{Status: "success", Message: "插件信息", Result: pluginMeta}) + case "list_actions": + outputJSON(&Response{Status: "success", Message: "支持的动作", Result: map[string]interface{}{"actions": pluginMeta["actions"]}}) + case "cdn": + rep, err := Cdn(req.Params) + if err != nil { + outputError("CDN 部署失败", err) + return + } + outputJSON(rep) + case "dcdn": + rep, err := Dcdn(req.Params) + if err != nil { + outputError("DCDN 部署失败", err) + return + } + outputJSON(rep) + case "oss": + rep, err := Oss(req.Params) + if err != nil { + outputError("OSS 部署失败", err) + return + } + outputJSON(rep) + case "waf": + rep, err := Waf(req.Params) + if err != nil { + outputError("WAF 部署失败", err) + return + } + outputJSON(rep) + case "esa": + rep, err := Esa(req.Params) + if err != nil { + outputError("ESA 部署失败", err) + return + } + outputJSON(rep) + case "cas": + rep, err := Cas(req.Params) + if err != nil { + outputError("CAS 上传失败", err) + return + } + outputJSON(rep) + default: + outputJSON(&Response{Status: "error", Message: "未知 action: " + req.Action}) + } +} diff --git a/plugins/alicloud/metadata.json b/plugins/alicloud/metadata.json new file mode 100644 index 0000000..ba2c868 --- /dev/null +++ b/plugins/alicloud/metadata.json @@ -0,0 +1,118 @@ +{ + "name": "aliyun", + "description": "阿里云", + "version": "1.0.0", + "author": "主包", + "config": [ + { + "name": "access_key_id", + "type": "string", + "description": "阿里云 AccessKeyId", + "required": true + }, + { + "name": "access_key_secret", + "type": "string", + "description": "阿里云 AccessKeySecret", + "required": true + } + ], + "actions": [ + { + "name": "cas", + "description": "上传到阿里云 CAS", + "params": [ + { + "name": "name", + "type": "string", + "description": "证书名称", + "required": false + }, + { + "name": "endpoint", + "type": "string", + "description": "CAS 端点", + "required": false + } + ] + }, + { + "name": "cdn", + "description": "部署到阿里云 CDN", + "params": [ + { + "name": "domain", + "type": "string", + "description": "域名", + "required": true + } + ] + }, + { + "name": "dcdn", + "description": "部署到阿里云 DCDN", + "params": [ + { + "name": "domain", + "type": "string", + "description": "域名", + "required": true + } + ] + }, + { + "name": "oss", + "description": "部署到阿里云 OSS", + "params": [ + { + "name": "region", + "type": "string", + "description": "区域", + "required": true + }, + { + "name": "bucket", + "type": "string", + "description": "存储桶", + "required": true + }, + { + "name": "domain", + "type": "string", + "description": "域名", + "required": true + } + ] + }, + { + "name": "waf", + "description": "部署到阿里云 WAF", + "params": [ + { + "name": "region", + "type": "string", + "description": "区域", + "required": true + }, + { + "name": "domain", + "type": "string", + "description": "域名", + "required": true + } + ] + }, + { + "name": "esa", + "description": "部署到阿里云 ESA", + "params": [ + { + "name": "site_id", + "type": "string", + "description": "站点 ID", + "required": true + } + ] + } + ] +} diff --git a/plugins/alicloud/oss/action.go b/plugins/alicloud/oss/action.go new file mode 100644 index 0000000..206c753 --- /dev/null +++ b/plugins/alicloud/oss/action.go @@ -0,0 +1,62 @@ +package osswrap + +import ( + "fmt" + + "github.com/aliyun/aliyun-oss-go-sdk/oss" +) + +func createClient(accessKeyId, accessKeySecret, region string) (*oss.Client, error) { + var endpoint string + switch region { + case "": + endpoint = "oss.aliyuncs.com" + case "cn-hzjbp", "cn-hzjbp-a", "cn-hzjbp-b": + endpoint = "oss-cn-hzjbp-a-internal.aliyuncs.com" + case "cn-shanghai-finance-1", "cn-shenzhen-finance-1", "cn-beijing-finance-1", "cn-north-2-gov-1": + endpoint = fmt.Sprintf("oss-%s-internal.aliyuncs.com", region) + default: + endpoint = fmt.Sprintf("oss-%s.aliyuncs.com", region) + } + return oss.New(endpoint, accessKeyId, accessKeySecret) +} + +func Deploy(cfg map[string]any) error { + certPEM, ok := cfg["cert"].(string) + if !ok || certPEM == "" { + return fmt.Errorf("证书错误:cert") + } + keyPEM, ok := cfg["key"].(string) + if !ok || keyPEM == "" { + return fmt.Errorf("证书错误:key") + } + accessKey, ok := cfg["access_key_id"].(string) + if !ok || accessKey == "" { + return fmt.Errorf("参数错误:access_key_id") + } + accessSecret, ok := cfg["access_key_secret"].(string) + if !ok || accessSecret == "" { + return fmt.Errorf("参数错误:access_key_secret") + } + region, ok := cfg["region"].(string) + if !ok || region == "" { + return fmt.Errorf("参数错误:region") + } + bucket, ok := cfg["bucket"].(string) + if !ok || bucket == "" { + return fmt.Errorf("参数错误:bucket") + } + domain, ok := cfg["domain"].(string) + if !ok || domain == "" { + return fmt.Errorf("参数错误:domain") + } + client, err := createClient(accessKey, accessSecret, region) + if err != nil { + return err + } + putReq := oss.PutBucketCname{ + Cname: domain, + CertificateConfiguration: &oss.CertificateConfiguration{Certificate: certPEM, PrivateKey: keyPEM, Force: true}, + } + return client.PutBucketCnameWithCertificate(bucket, putReq) +} diff --git a/plugins/alicloud/waf/action.go b/plugins/alicloud/waf/action.go new file mode 100644 index 0000000..38aec9e --- /dev/null +++ b/plugins/alicloud/waf/action.go @@ -0,0 +1,54 @@ +package waf + +import ( + "fmt" + "time" +) + +func Deploy(cfg map[string]any) error { + certPEM, ok := cfg["cert"].(string) + if !ok || certPEM == "" { + return fmt.Errorf("证书错误:cert") + } + keyPEM, ok := cfg["key"].(string) + if !ok || keyPEM == "" { + return fmt.Errorf("证书错误:key") + } + accessKey, ok := cfg["access_key_id"].(string) + if !ok || accessKey == "" { + return fmt.Errorf("参数错误:access_key_id") + } + accessSecret, ok := cfg["access_key_secret"].(string) + if !ok || accessSecret == "" { + return fmt.Errorf("参数错误:access_key_secret") + } + region, ok := cfg["region"].(string) + if !ok || region == "" { + return fmt.Errorf("参数错误:region") + } + domain, ok := cfg["domain"].(string) + if !ok || domain == "" { + return fmt.Errorf("参数错误:domain") + } + client, err := ClientAliWaf(accessKey, accessSecret, region) + if err != nil { + return err + } + instanceId, err := client.IGetInstanceId() + if err != nil { + return fmt.Errorf("获取地区实例ID失败: %v", err) + } + domainDesc, err := client.IDescribeDomainDetail(*instanceId, domain) + if err != nil { + return fmt.Errorf("获取域名配置详情失败: %v", err) + } + certName := fmt.Sprintf("%s_allinssl_%d", domain, time.Now().UnixMilli()) + certId, err := client.ICreateCerts(certName, certPEM, keyPEM, *instanceId) + if err != nil { + return fmt.Errorf("创建证书失败: %v", err) + } + if err := client.IUpdateDomain(domainDesc, *instanceId, *certId); err != nil { + return fmt.Errorf("更新证书失败: %v", err) + } + return nil +} diff --git a/plugins/alicloud/waf/client.go b/plugins/alicloud/waf/client.go new file mode 100644 index 0000000..5d96183 --- /dev/null +++ b/plugins/alicloud/waf/client.go @@ -0,0 +1,246 @@ +package waf + +import ( + "fmt" + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + openapiutil "github.com/alibabacloud-go/openapi-util/service" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + aliyunwaf "github.com/alibabacloud-go/waf-openapi-20211001/v5/client" +) + +type AliyunWafClient struct { + aliyunwaf.Client + accessKey string + accessSecret string + region string +} + +func ClientAliWaf(accessKey, accessSecret, region string) (_result *AliyunWafClient, err error) { + config := &openapi.Config{ + AccessKeyId: tea.String(accessKey), + AccessKeySecret: tea.String(accessSecret), + Endpoint: tea.String(fmt.Sprintf("wafopenapi.%s.aliyuncs.com", region)), + } + client, err := aliyunwaf.NewClient(config) + if err != nil { + return nil, err + } + aliyunwafClient := &AliyunWafClient{ + Client: *client, + accessKey: accessKey, + accessSecret: accessSecret, + region: region, + } + return aliyunwafClient, nil +} + +type CreateCertsResponseBody struct { + CertIdentifier *string `json:"CertIdentifier,omitempty" xml:"DomainInfo,omitempty"` + RequestId *string `json:"RequestId,omitempty" xml:"RequestId,omitempty"` +} + +type CreateCertsResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *CreateCertsResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (client *AliyunWafClient) ICreateCerts(certName, certContent, certKey, instanceId string) (certId *string, _err error) { + query := map[string]interface{}{ + "CertName": certName, + "CertContent": certContent, + "CertKey": certKey, + "InstanceId": instanceId, + } + req := &openapi.OpenApiRequest{Query: openapiutil.Query(query)} + params := &openapi.Params{ + Action: tea.String("CreateCerts"), + Version: tea.String("2021-10-01"), + Protocol: tea.String("HTTPS"), + Pathname: tea.String("/"), + Method: tea.String("POST"), + AuthType: tea.String("AK"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("formData"), + BodyType: tea.String("json"), + } + createCertsResponse := &CreateCertsResponse{} + runtime := &util.RuntimeOptions{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return nil, _err + } + _err = tea.Convert(_body, &createCertsResponse) + certId = createCertsResponse.Body.CertIdentifier + return certId, _err +} + +func (client *AliyunWafClient) IGetInstanceId() (instanceId *string, _err error) { + req := &aliyunwaf.DescribeInstanceRequest{RegionId: tea.String(client.region)} + response, _err := client.DescribeInstance(req) + if _err != nil { + return nil, _err + } + instanceId = response.Body.InstanceId + if instanceId == nil || *instanceId == "" { + _err = fmt.Errorf("未找到WAF实例ID,请检查是否已创建WAF实例") + return nil, _err + } + return instanceId, _err +} + +func (client *AliyunWafClient) IDescribeDomainDetail(instanceId, domain string) (describeDomainDetailResponseBody *aliyunwaf.DescribeDomainDetailResponseBody, _err error) { + req := &aliyunwaf.DescribeDomainDetailRequest{ + InstanceId: tea.String(instanceId), + RegionId: tea.String(client.region), + Domain: tea.String(domain), + } + response, _err := client.DescribeDomainDetail(req) + if _err != nil { + return nil, _err + } + describeDomainDetailResponseBody = response.Body + return describeDomainDetailResponseBody, _err +} + +func (client *AliyunWafClient) IUpdateDomain(domainDesc *aliyunwaf.DescribeDomainDetailResponseBody, instanceId, certId string) error { + modifyDomainReq := &aliyunwaf.ModifyDomainRequest{ + InstanceId: tea.String(instanceId), + RegionId: tea.String(client.region), + Domain: domainDesc.Domain, + Listen: &aliyunwaf.ModifyDomainRequestListen{CertId: tea.String(certId)}, + } + assignDomain(domainDesc, modifyDomainReq) + _, err := client.ModifyDomain(modifyDomainReq) + if err != nil { + return err + } + return nil +} + +func assignDomain(from *aliyunwaf.DescribeDomainDetailResponseBody, to *aliyunwaf.ModifyDomainRequest) *aliyunwaf.ModifyDomainRequest { + if from == nil { + return to + } + if from.Listen != nil { + if to.Listen == nil { + to.Listen = &aliyunwaf.ModifyDomainRequestListen{} + } + if from.Listen.CipherSuite != nil { + to.Listen.CipherSuite = tea.Int32(int32(*from.Listen.CipherSuite)) + } + if from.Listen.CustomCiphers != nil { + to.Listen.CustomCiphers = from.Listen.CustomCiphers + } + if from.Listen.EnableTLSv3 != nil { + to.Listen.EnableTLSv3 = from.Listen.EnableTLSv3 + } + if from.Listen.ExclusiveIp != nil { + to.Listen.ExclusiveIp = from.Listen.ExclusiveIp + } + if from.Listen.FocusHttps != nil { + to.Listen.FocusHttps = from.Listen.FocusHttps + } + if from.Listen.Http2Enabled != nil { + to.Listen.Http2Enabled = from.Listen.Http2Enabled + } + if from.Listen.IPv6Enabled != nil { + to.Listen.IPv6Enabled = from.Listen.IPv6Enabled + } + if from.Listen.ProtectionResource != nil { + to.Listen.ProtectionResource = from.Listen.ProtectionResource + } + if from.Listen.TLSVersion != nil { + to.Listen.TLSVersion = from.Listen.TLSVersion + } + if from.Listen.XffHeaderMode != nil { + to.Listen.XffHeaderMode = tea.Int32(int32(*from.Listen.XffHeaderMode)) + } + if from.Listen.XffHeaders != nil { + to.Listen.XffHeaders = from.Listen.XffHeaders + } + if from.Listen.HttpPorts != nil { + to.Listen.HttpPorts = make([]*int32, len(from.Listen.HttpPorts)) + for i, port := range from.Listen.HttpPorts { + if port != nil { + to.Listen.HttpPorts[i] = tea.Int32(int32(*port)) + } + } + } + if from.Listen.HttpsPorts != nil { + to.Listen.HttpsPorts = make([]*int32, len(from.Listen.HttpsPorts)) + for i, port := range from.Listen.HttpsPorts { + if port != nil { + to.Listen.HttpsPorts[i] = tea.Int32(int32(*port)) + } + } + } + } + if from.Redirect != nil { + if to.Redirect == nil { + to.Redirect = &aliyunwaf.ModifyDomainRequestRedirect{} + } + if from.Redirect.ConnectTimeout != nil { + to.Redirect.ConnectTimeout = from.Redirect.ConnectTimeout + } + if from.Redirect.FocusHttpBackend != nil { + to.Redirect.FocusHttpBackend = from.Redirect.FocusHttpBackend + } + if from.Redirect.Keepalive != nil { + to.Redirect.Keepalive = from.Redirect.Keepalive + } + if from.Redirect.KeepaliveRequests != nil { + to.Redirect.KeepaliveRequests = from.Redirect.KeepaliveRequests + } + if from.Redirect.KeepaliveTimeout != nil { + to.Redirect.KeepaliveTimeout = from.Redirect.KeepaliveTimeout + } + if from.Redirect.Loadbalance != nil { + to.Redirect.Loadbalance = from.Redirect.Loadbalance + } + if from.Redirect.ReadTimeout != nil { + to.Redirect.ReadTimeout = from.Redirect.ReadTimeout + } + if from.Redirect.Retry != nil { + to.Redirect.Retry = from.Redirect.Retry + } + if from.Redirect.SniEnabled != nil { + to.Redirect.SniEnabled = from.Redirect.SniEnabled + } + if from.Redirect.SniHost != nil { + to.Redirect.SniHost = from.Redirect.SniHost + } + if from.Redirect.WriteTimeout != nil { + to.Redirect.WriteTimeout = from.Redirect.WriteTimeout + } + if from.Redirect.XffProto != nil { + to.Redirect.XffProto = from.Redirect.XffProto + } + if from.Redirect.Backends != nil { + to.Redirect.Backends = make([]*string, len(from.Redirect.Backends)) + for i, backend := range from.Redirect.Backends { + if backend != nil { + to.Redirect.Backends[i] = backend.Backend + } + } + } + if from.Redirect.BackupBackends != nil { + to.Redirect.BackupBackends = make([]*string, len(from.Redirect.BackupBackends)) + for i, backend := range from.Redirect.BackupBackends { + if backend != nil { + to.Redirect.BackupBackends[i] = backend.Backend + } + } + } + if from.Redirect.RequestHeaders != nil { + to.Redirect.RequestHeaders = make([]*aliyunwaf.ModifyDomainRequestRedirectRequestHeaders, len(from.Redirect.RequestHeaders)) + for i, header := range from.Redirect.RequestHeaders { + if header != nil { + to.Redirect.RequestHeaders[i] = &aliyunwaf.ModifyDomainRequestRedirectRequestHeaders{Key: header.Key, Value: header.Value} + } + } + } + } + return to +} diff --git a/plugins/aliyun/action.go b/plugins/aliyun/action.go deleted file mode 100644 index c759126..0000000 --- a/plugins/aliyun/action.go +++ /dev/null @@ -1,156 +0,0 @@ -package main - -import ( - "ALLinSSL/plugins/aliyun/cas" - "ALLinSSL/plugins/aliyun/esa" - "fmt" - "strconv" - "strings" -) - -func uploadToCAS(cfg map[string]any) (*Response, error) { - if cfg == nil { - return nil, fmt.Errorf("config cannot be nil") - } - certStr, ok := cfg["cert"].(string) - if !ok || certStr == "" { - return nil, fmt.Errorf("cert is required and must be a string") - } - keyStr, ok := cfg["key"].(string) - if !ok || keyStr == "" { - return nil, fmt.Errorf("key is required and must be a string") - } - accessKey, ok := cfg["access_key"].(string) - if !ok || accessKey == "" { - return nil, fmt.Errorf("access_key is required and must be a string") - } - secretKey, ok := cfg["secret_key"].(string) - if !ok || secretKey == "" { - return nil, fmt.Errorf("secret_key is required and must be a string") - } - endpoint, ok := cfg["endpoint"].(string) - if !ok || endpoint == "" { - endpoint = "cas.ap-southeast-1.aliyuncs.com" // 默认值 - } - name, ok := cfg["name"].(string) - if !ok || name == "" { - name = "allinssl-certificate" // 默认名称 - } - - client, err := cas.CreateClient(accessKey, secretKey, endpoint) - if err != nil { - return nil, fmt.Errorf("failed to create CAS client: %w", err) - } - // 上传证书到 CAS - err = cas.UploadToCas(client, certStr, keyStr, name) - if err != nil { - return nil, fmt.Errorf("failed to upload certificate to CAS: %w", err) - } - - return &Response{ - Status: "success", - Message: "CAS upload successful", - Result: nil, - }, nil -} - -func deployToESA(cfg map[string]any) (*Response, error) { - if cfg == nil { - return nil, fmt.Errorf("config cannot be nil") - } - certPEM, ok := cfg["cert"].(string) - if !ok || certPEM == "" { - return nil, fmt.Errorf("cert is required and must be a string") - } - privkeyPEM, ok := cfg["key"].(string) - if !ok || privkeyPEM == "" { - return nil, fmt.Errorf("key is required and must be a string") - } - accessKey, ok := cfg["access_key"].(string) - if !ok || accessKey == "" { - return nil, fmt.Errorf("access_key is required and must be a string") - } - secretKey, ok := cfg["secret_key"].(string) - if !ok || secretKey == "" { - return nil, fmt.Errorf("secret_key is required and must be a string") - } - var siteID int64 - switch v := cfg["site_id"].(type) { - case float64: - siteID = int64(v) - case string: - var err error - siteID, err = strconv.ParseInt(v, 10, 64) - if err != nil { - return nil, fmt.Errorf("site_id format error: %w", err) - } - case int: - siteID = int64(v) - default: - return nil, fmt.Errorf("site_id format error") - } - var delRepeatDomainCert bool - switch v := cfg["del_repeat_domain_cert"].(type) { - case bool: - delRepeatDomainCert = v - case string: - if v == "true" { - delRepeatDomainCert = true - } - case nil: - delRepeatDomainCert = false - } - - client, err := esa.CreateEsaClient(accessKey, secretKey) - if err != nil { - return nil, fmt.Errorf("failed to create ESA client: %w", err) - } - - // 检查是否需要删除重复的域名证书 - if delRepeatDomainCert { - // 解析现有证书的域名 - certObj, err := ParseCertificate([]byte(certPEM)) - if err != nil { - return nil, fmt.Errorf("failed to parse certificate: %w", err) - } - domainSet := make(map[string]bool) - - if certObj.Subject.CommonName != "" { - domainSet[certObj.Subject.CommonName] = true - } - for _, dns := range certObj.DNSNames { - domainSet[dns] = true - } - - // 转成切片并拼接成逗号分隔的字符串 - var domains []string - for domain := range domainSet { - domains = append(domains, domain) - } - domainList := strings.Join(domains, ",") - - certList, err := esa.ListCertFromESA(client, siteID) - if err != nil { - return nil, fmt.Errorf("failed to list certificates from ESA: %w", err) - } - for _, cert := range certList { - if *cert.SAN == domainList { - err = esa.DeleteEsaCert(client, siteID, *cert.Id) - if err != nil { - return nil, fmt.Errorf("failed to delete existing certificate: %w", err) - } - } - } - } - - err = esa.UploadCertToESA(client, siteID, certPEM, privkeyPEM) - if err != nil { - return nil, fmt.Errorf("failed to upload certificate to ESA: %w", err) - } - - return &Response{ - Status: "success", - Message: "ESA deployment successful", - Result: nil, - }, nil -} diff --git a/plugins/aliyun/cas/action.go b/plugins/aliyun/cas/action.go deleted file mode 100644 index 97e1dd4..0000000 --- a/plugins/aliyun/cas/action.go +++ /dev/null @@ -1,31 +0,0 @@ -package cas - -import ( - cas "github.com/alibabacloud-go/cas-20200407/v4/client" - openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" - util "github.com/alibabacloud-go/tea-utils/v2/service" - "github.com/alibabacloud-go/tea/tea" -) - -func CreateClient(accessKey, accessSecret, endpoint string) (*cas.Client, error) { - if endpoint == "" { - endpoint = "cas.ap-southeast-1.aliyuncs.com" - } - config := &openapi.Config{ - AccessKeyId: tea.String(accessKey), - AccessKeySecret: tea.String(accessSecret), - Endpoint: tea.String(endpoint), - } - return cas.NewClient(config) -} - -func UploadToCas(client *cas.Client, cert, key, name string) error { - uploadUserCertificateRequest := &cas.UploadUserCertificateRequest{ - Name: tea.String(name), - Cert: tea.String(cert), - Key: tea.String(key), - } - runtime := &util.RuntimeOptions{} - _, err := client.UploadUserCertificateWithOptions(uploadUserCertificateRequest, runtime) - return err -} diff --git a/plugins/aliyun/esa/action.go b/plugins/aliyun/esa/action.go deleted file mode 100644 index 319821e..0000000 --- a/plugins/aliyun/esa/action.go +++ /dev/null @@ -1,63 +0,0 @@ -package esa - -import ( - openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" - esa "github.com/alibabacloud-go/esa-20240910/v2/client" - util "github.com/alibabacloud-go/tea-utils/v2/service" - "github.com/alibabacloud-go/tea/tea" -) - -// CreateEsaClient creates a new ESA client with the provided access key and secret. -func CreateEsaClient(accessKey, accessSecret string) (*esa.Client, error) { - config := &openapi.Config{ - AccessKeyId: tea.String(accessKey), - AccessKeySecret: tea.String(accessSecret), - Endpoint: tea.String("esa.ap-southeast-1.aliyuncs.com"), - } - return esa.NewClient(config) -} - -// UploadCertToESA uploads the certificate and private key to Alibaba Cloud ESA. -func UploadCertToESA(client *esa.Client, id int64, certPEM, privkeyPEM string) error { - req := esa.SetCertificateRequest{ - SiteId: tea.Int64(id), - Type: tea.String("upload"), - Certificate: tea.String(certPEM), - PrivateKey: tea.String(privkeyPEM), - } - runtime := &util.RuntimeOptions{} - - _, err := client.SetCertificateWithOptions(&req, runtime) - if err != nil { - return err - } - return nil -} - -// ListCertFromESA retrieves the list of certificates from Alibaba Cloud ESA for a given site ID. -func ListCertFromESA(client *esa.Client, id int64) ([]*esa.ListCertificatesResponseBodyResult, error) { - req := esa.ListCertificatesRequest{ - SiteId: tea.Int64(id), - } - runtime := &util.RuntimeOptions{} - resp, err := client.ListCertificatesWithOptions(&req, runtime) - if err != nil { - return nil, err - } - return resp.Body.Result, nil -} - -// DeleteEsaCert deletes a certificate from Alibaba Cloud ESA by its ID. -func DeleteEsaCert(client *esa.Client, id int64, certID string) error { - req := esa.DeleteCertificateRequest{ - SiteId: tea.Int64(id), - Id: tea.String(certID), - } - runtime := &util.RuntimeOptions{} - - _, err := client.DeleteCertificateWithOptions(&req, runtime) - if err != nil { - return err - } - return nil -} diff --git a/plugins/aliyun/main.go b/plugins/aliyun/main.go deleted file mode 100644 index e3b3c94..0000000 --- a/plugins/aliyun/main.go +++ /dev/null @@ -1,123 +0,0 @@ -package main - -import ( - "crypto/x509" - "encoding/json" - "encoding/pem" - "fmt" - "io" - "os" -) - -type ActionInfo struct { - Name string `json:"name"` - Description string `json:"description"` - Params map[string]any `json:"params,omitempty"` // 可选参数 -} - -type Request struct { - Action string `json:"action"` - Params map[string]interface{} `json:"params"` -} - -type Response struct { - Status string `json:"status"` - Message string `json:"message"` - Result map[string]interface{} `json:"result"` -} - -var pluginMeta = map[string]interface{}{ - "name": "aliyun", - "description": "部署到阿里云", - "version": "1.0.0", - "author": "主包", - "config": map[string]interface{}{ - "access_key": "阿里云 AccessKey", - "secret_key": "阿里云 SecretKey", - }, - "actions": []ActionInfo{ - { - Name: "deployToESA", - Description: "部署到阿里云esa", - Params: map[string]any{ - "site_id": "站点 ID", - "del_repeat_domain_cert": "是否删除重复的域名证书,默认 false", - }, - }, - { - Name: "uploadToCAS", - Description: "上传到阿里云cas", - Params: map[string]any{ - "name": "证书名称", - }, - }, - }, -} - -// **解析 PEM 格式的证书** -func ParseCertificate(certPEM []byte) (*x509.Certificate, error) { - block, _ := pem.Decode(certPEM) - if block == nil { - return nil, fmt.Errorf("无法解析证书 PEM") - } - return x509.ParseCertificate(block.Bytes) -} - -func outputJSON(resp *Response) { - _ = json.NewEncoder(os.Stdout).Encode(resp) -} - -func outputError(msg string, err error) { - outputJSON(&Response{ - Status: "error", - Message: fmt.Sprintf("%s: %v", msg, err), - }) -} - -func main() { - var req Request - input, err := io.ReadAll(os.Stdin) - if err != nil { - outputError("读取输入失败", err) - return - } - - if err := json.Unmarshal(input, &req); err != nil { - outputError("解析请求失败", err) - return - } - - switch req.Action { - case "get_metadata": - outputJSON(&Response{ - Status: "success", - Message: "插件信息", - Result: pluginMeta, - }) - case "list_actions": - outputJSON(&Response{ - Status: "success", - Message: "支持的动作", - Result: map[string]interface{}{"actions": pluginMeta["actions"]}, - }) - case "deployToESA": - rep, err := deployToESA(req.Params) - if err != nil { - outputError("ESA 部署失败", err) - return - } - outputJSON(rep) - case "uploadToCAS": - rep, err := uploadToCAS(req.Params) - if err != nil { - outputError("CAS 上传失败", err) - return - } - outputJSON(rep) - default: - outputJSON(&Response{ - Status: "error", - Message: "未知 action: " + req.Action, - }) - } -} diff --git a/plugins/doge/action.go b/plugins/doge/action.go deleted file mode 100644 index 9c7fbd1..0000000 --- a/plugins/doge/action.go +++ /dev/null @@ -1,225 +0,0 @@ -package main - -import ( - "crypto/hmac" - "crypto/sha1" - "encoding/hex" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "strings" -) - -type Auth struct { - AccessKey string `json:"access_key"` - SecretKey string `json:"secret_key"` -} - -func NewAuth(accessKey, secretKey string) *Auth { - return &Auth{ - AccessKey: accessKey, - SecretKey: secretKey, - } -} - -func Cdn(cfg map[string]any) (*Response, error) { - if cfg == nil { - return nil, fmt.Errorf("config cannot be nil") - } - certStr, ok := cfg["cert"].(string) - if !ok || certStr == "" { - return nil, fmt.Errorf("cert is required and must be a string") - } - keyStr, ok := cfg["key"].(string) - if !ok || keyStr == "" { - return nil, fmt.Errorf("key is required and must be a string") - } - accessKey, ok := cfg["access_key"].(string) - if !ok || accessKey == "" { - return nil, fmt.Errorf("access_key is required and must be a string") - } - secretKey, ok := cfg["secret_key"].(string) - if !ok || secretKey == "" { - return nil, fmt.Errorf("secret_key is required and must be a string") - } - domain, ok := cfg["domain"].(string) - if !ok || domain == "" { - return nil, fmt.Errorf("domain is required and must be a string") - } - sha256, err := GetSHA256(certStr) - if err != nil { - return nil, fmt.Errorf("failed to get SHA256 of cert: %w", err) - } - note := fmt.Sprintf("allinssl-%s", sha256) - - a := NewAuth(accessKey, secretKey) - // 检查证书是否已存在于 CDN - // 只根据证书名称检查是否存在,格式为 "allinssl-" - certList, err := a.listCertFromCdn() - if err != nil { - return nil, fmt.Errorf("failed to list certs from CDN: %w", err) - } - var certID float64 - for _, cert := range certList { - if cert["note"] == note { - certID, ok = cert["id"].(float64) - if !ok { - certID = 0 - } - } - } - // 如果证书不存在,则上传证书到 CDN - if certID == 0 { - certID, err = a.uploadCertToCdn(certStr, keyStr, note) - if err != nil || certID == 0 { - return nil, fmt.Errorf("failed to upload to CDN: %w", err) - } - } - // 绑定证书到域名 - bindRes, err := a.bindCertToCdn(certID, domain) - if err != nil { - return nil, fmt.Errorf("failed to bind cert to CDN: %w", err) - } - - return &Response{ - Status: "success", - Message: "Certificate uploaded and bound successfully", - Result: bindRes, - }, nil -} - -func (a Auth) uploadCertToCdn(cert, key, note string) (float64, error) { - params := map[string]any{ - "cert": cert, - "private": key, - "note": note, - } - - res, err := a.DogeCloudAPI("/cdn/cert/upload.json", params, true) - if err != nil { - return 0, fmt.Errorf("failed to call DogeCloud API: %w", err) - } - code, ok := res["code"].(float64) - if !ok { - return 0, fmt.Errorf("invalid response format: code not found") - } - if code != 200 { - return 0, fmt.Errorf("DogeCloud API error: %s", res["msg"]) - } - data, ok := res["data"].(map[string]any) - if !ok { - return 0, fmt.Errorf("invalid response format: data not found") - } - certID, ok := data["id"].(float64) - if !ok { - return 0, fmt.Errorf("invalid response format: id not found") - } - return certID, nil -} - -func (a Auth) listCertFromCdn() ([]map[string]any, error) { - res, err := a.DogeCloudAPI("/cdn/cert/list.json", map[string]interface{}{}, true) - if err != nil { - return nil, fmt.Errorf("failed to call DogeCloud API: %w", err) - } - code, ok := res["code"].(float64) - if !ok { - return nil, fmt.Errorf("invalid response format: code not found") - } - if code != 200 { - return nil, fmt.Errorf("DogeCloud API error: %s", res["msg"]) - } - data, ok := res["data"].(map[string]any) - if !ok { - return nil, fmt.Errorf("invalid response format: data not found") - } - certList, ok := data["certs"].([]any) - if !ok { - return nil, fmt.Errorf("invalid response format: certs not found") - } - certs := make([]map[string]any, 0, len(certList)) - for _, cert := range certList { - certMap, ok := cert.(map[string]any) - if !ok { - return nil, fmt.Errorf("invalid response format: cert item is not a map") - } - certs = append(certs, certMap) - } - return certs, nil -} - -func (a Auth) bindCertToCdn(certID float64, domain string) (map[string]interface{}, error) { - params := map[string]interface{}{ - "id": certID, - "domain": domain, - } - res, err := a.DogeCloudAPI("/cdn/cert/bind.json", params, true) - if err != nil { - return nil, fmt.Errorf("failed to call DogeCloud API: %w", err) - } - code, ok := res["code"].(float64) - if !ok { - return nil, fmt.Errorf("invalid response format: code not found") - } - if code != 200 { - return nil, fmt.Errorf("DogeCloud API error: %s", res["msg"]) - } - return res, nil - -} - -// DogeCloudAPI 调用多吉云的 API 根据多吉云官网示例修改 -func (a Auth) DogeCloudAPI(apiPath string, data map[string]interface{}, jsonMode bool) (map[string]interface{}, error) { - AccessKey := a.AccessKey - SecretKey := a.SecretKey - - body := "" - mime := "" - if jsonMode { - _body, err := json.Marshal(data) - if err != nil { - return nil, err - } - body = string(_body) - mime = "application/json" - } else { - values := url.Values{} - for k, v := range data { - values.Set(k, v.(string)) - } - body = values.Encode() - mime = "application/x-www-form-urlencoded" - } - - signStr := apiPath + "\n" + body - hmacObj := hmac.New(sha1.New, []byte(SecretKey)) - hmacObj.Write([]byte(signStr)) - sign := hex.EncodeToString(hmacObj.Sum(nil)) - Authorization := "TOKEN " + AccessKey + ":" + sign - - req, err := http.NewRequest("POST", "https://api.dogecloud.com"+apiPath, strings.NewReader(body)) - if err != nil { - return nil, err // 创建请求错误 - } - req.Header.Add("Content-Type", mime) - req.Header.Add("Authorization", Authorization) - client := http.Client{} - resp, err := client.Do(req) - if err != nil { - return nil, err - } // 网络错误 - defer resp.Body.Close() - r, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err // 读取响应错误 - } - var result map[string]interface{} - - err = json.Unmarshal(r, &result) - if err != nil { - return nil, err - } - return result, nil -} diff --git a/plugins/doge/main.go b/plugins/doge/main.go deleted file mode 100644 index 931fcf0..0000000 --- a/plugins/doge/main.go +++ /dev/null @@ -1,117 +0,0 @@ -package main - -import ( - "crypto/sha256" - "crypto/x509" - "encoding/hex" - "encoding/json" - "encoding/pem" - "fmt" - "io" - "os" -) - -type ActionInfo struct { - Name string `json:"name"` - Description string `json:"description"` - Params map[string]any `json:"params,omitempty"` -} - -type Request struct { - Action string `json:"action"` - Params map[string]interface{} `json:"params"` -} - -type Response struct { - Status string `json:"status"` - Message string `json:"message"` - Result map[string]interface{} `json:"result"` -} - -var pluginMeta = map[string]interface{}{ - "name": "doge", - "description": "部署到多吉云", - "version": "1.0.0", - "author": "主包", - "config": map[string]interface{}{ - "access_key": "多吉云 AccessKey", - "secret_key": "多吉云 SecretKey", - }, - "actions": []ActionInfo{ - { - Name: "cdn", - Description: "部署到多吉云cdn", - Params: map[string]any{ - "domain": "CDN 域名", - }, - }, - }, -} - -func GetSHA256(certStr string) (string, error) { - certPEM := []byte(certStr) - block, _ := pem.Decode(certPEM) - if block == nil { - return "", fmt.Errorf("无法解析证书 PEM") - } - cert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return "", fmt.Errorf("解析证书失败: %v", err) - } - - sha256Hash := sha256.Sum256(cert.Raw) - return hex.EncodeToString(sha256Hash[:]), nil -} - -func outputJSON(resp *Response) { - _ = json.NewEncoder(os.Stdout).Encode(resp) -} - -func outputError(msg string, err error) { - outputJSON(&Response{ - Status: "error", - Message: fmt.Sprintf("%s: %v", msg, err), - }) -} - -func main() { - var req Request - input, err := io.ReadAll(os.Stdin) - if err != nil { - outputError("读取输入失败", err) - return - } - - if err := json.Unmarshal(input, &req); err != nil { - outputError("解析请求失败", err) - return - } - - switch req.Action { - case "get_metadata": - outputJSON(&Response{ - Status: "success", - Message: "插件信息", - Result: pluginMeta, - }) - case "list_actions": - outputJSON(&Response{ - Status: "success", - Message: "支持的动作", - Result: map[string]interface{}{"actions": pluginMeta["actions"]}, - }) - case "cdn": - rep, err := Cdn(req.Params) - if err != nil { - outputError("CDN 部署失败", err) - return - } - outputJSON(rep) - - default: - outputJSON(&Response{ - Status: "error", - Message: "未知 action: " + req.Action, - }) - } -} diff --git a/plugins/doge/metadata.json b/plugins/doge/metadata.json new file mode 100644 index 0000000..0e64a9a --- /dev/null +++ b/plugins/doge/metadata.json @@ -0,0 +1,34 @@ +{ + "name": "doge", + "description": "多吉云", + "version": "1.0.0", + "author": "主包", + "config": [ + { + "name": "access_key", + "type": "string", + "description": "多吉云 AccessKey", + "required": true + }, + { + "name": "secret_key", + "type": "string", + "description": "多吉云 SecretKey", + "required": true + } + ], + "actions": [ + { + "name": "cdn", + "description": "部署到多吉云cdn", + "params": [ + { + "name": "domain", + "type": "string", + "description": "CDN 域名", + "required": true + } + ] + } + ] +} diff --git a/version.json b/version.json new file mode 100644 index 0000000..1077a41 --- /dev/null +++ b/version.json @@ -0,0 +1,5 @@ +{ + "version": "v1.1.1", + "date": "2025-09-18", + "log": "【新增】宝塔dns\n【修复】查看证书于下载证书内容不一致\n【修复】多个ca无法选中\n【修复】创建中间证书私有ca加密算法没有默认继承\n【调整】下载自签证书附带pfx\n【调整】禁止在同一个ca下添加相同的邮箱" +} \ No newline at end of file