Compare commits

..

60 Commits

Author SHA1 Message Date
刘祥超
7448ff119a 修改部分链接 2024-05-20 11:11:09 +08:00
刘祥超
3b8e04d421 版本号修改为1.3.9 2024-05-20 09:49:19 +08:00
刘祥超
6c1182b290 提交components.js 2024-05-20 09:49:06 +08:00
刘祥超
e66e020f36 注释Telegram联系方式 2024-05-19 11:59:18 +08:00
刘祥超
be82c9c48f Update README.md 2024-05-18 21:36:47 +08:00
刘祥超
8a74248eaf 批量替换copy right声明 2024-05-17 17:56:37 +08:00
刘祥超
aea75130bb 规范部分组件事件名写法 2024-05-17 12:10:44 +08:00
刘祥超
2fd3150677 暂时不限制登录区域 2024-05-16 18:52:43 +08:00
刘祥超
7247fff017 修复测试版本若干问题 2024-05-16 15:32:58 +08:00
刘祥超
edb480e3d7 优化HTTP认证方式申请证书的文字提示 2024-05-15 18:24:49 +08:00
刘祥超
38320e04a3 添加和修改域名只需要点击一次保存按钮 2024-05-15 13:50:11 +08:00
刘祥超
b43f523a78 修改节点停用时发送命令的提示 2024-05-15 10:53:13 +08:00
刘祥超
9b4d852d68 edge-admin upgrade命令只有获取到版本号时才输出下载进度 2024-05-15 10:22:56 +08:00
刘祥超
974e53445c 优化WAF分组创建和修改弹窗尺寸 2024-05-15 08:32:45 +08:00
刘祥超
d6ad7dbe45 优化WAF相关文字提示 2024-05-15 08:27:41 +08:00
刘祥超
6fc428a945 优化健康检查表单中的文字 2024-05-15 07:52:39 +08:00
刘祥超
776b08653a 修复异地登录自动验证提交两次的问题 2024-05-14 20:26:15 +08:00
刘祥超
2dcaad0e0e 隐藏MMAP相关设置 2024-05-14 19:33:23 +08:00
刘祥超
2aaef32156 测试版本号增加beta标识 2024-05-14 17:16:19 +08:00
刘祥超
2aa44a10b7 commit components.js 2024-05-14 17:15:49 +08:00
刘祥超
ded6bf3c16 用户列表页增加手机号绑定状态及筛选 2024-05-14 15:06:18 +08:00
刘祥超
4446963752 平台用户--用户列表增加无法登录的说明文字 2024-05-14 14:31:22 +08:00
刘祥超
a1ce16b92c 优化“人机识别验证方式”文字提示 2024-05-12 19:11:40 +08:00
刘祥超
8245453c2e DNS服务商账号增加“最小TTL”选项 2024-05-12 09:33:30 +08:00
刘祥超
ab54e51ec6 安装MySQL之前尝试安装libnuma1 2024-05-12 08:56:28 +08:00
刘祥超
cd957718c1 域名解析增加bunny.net支持(仅商业版) 2024-05-10 17:00:42 +08:00
刘祥超
965784a164 实现Ticket登录 2024-05-10 14:28:25 +08:00
刘祥超
3bcbde4ba0 WAF区域封禁增加“允许搜索引擎”选项 2024-05-08 17:53:12 +08:00
刘祥超
c9ec1eed3a 优化WAF规则集“启用”链接样式 2024-05-08 16:58:11 +08:00
刘祥超
bb8a4813aa WAF规则集中增加“允许搜索引擎”选项,可以快速允许搜索引擎访问 2024-05-08 16:42:40 +08:00
刘祥超
6d44745d18 缓存策略增加“允许读取不完整的Partial Content”选项 2024-05-07 20:04:39 +08:00
刘祥超
12b9840b34 生成components.js时去除行前空白和注释 2024-05-07 09:14:36 +08:00
刘祥超
100a49f054 提交components.js 2024-05-07 08:50:52 +08:00
刘祥超
2a6245333f 实现远程卸载节点功能 2024-05-07 08:40:18 +08:00
刘祥超
11496d7ffb 优化代码 2024-05-06 20:30:51 +08:00
刘祥超
a97dd9d07b 在网站WAF中,可以导出和导入规则集代码,优化修改规则集交互 2024-05-06 20:25:36 +08:00
刘祥超
a0559e3456 简化API节点的数据库配置(db.yaml) 2024-05-06 17:29:11 +08:00
刘祥超
d1ef6da027 网站全局设置中增加“XFF中最多地址数”选项 2024-05-06 14:03:09 +08:00
刘祥超
ac76839256 优化IP名单中的类型显示标签;可以使用代号搜索IP名单 2024-05-06 08:56:02 +08:00
刘祥超
1783773c89 IP检查也支持灰名单 2024-05-05 20:20:43 +08:00
刘祥超
67c5d47e0c IP名单列表显示代号 2024-05-05 19:51:17 +08:00
刘祥超
3d67217606 优化IP名单
* 增加IP灰名单,用于仅记录并观察IP
2024-05-05 18:56:25 +08:00
刘祥超
a13711db07 IP名单增加代号管理 2024-05-05 14:08:32 +08:00
刘祥超
9ed47a3a9d 部分“服务”文字改为“网站” 2024-05-05 11:23:57 +08:00
刘祥超
cfb88e6bd6 数据看板增加独立IP数量 2024-05-05 11:13:23 +08:00
刘祥超
1b28687bd6 在HTTPS页面提示用户没有设置证书的域名 2024-05-04 17:33:44 +08:00
刘祥超
9be6056108 优化文字提示 2024-05-04 17:06:45 +08:00
刘祥超
87aa9c6fa0 提交components.js 2024-05-04 10:21:18 +08:00
刘祥超
9b5a092b0d IP地址的相关“不可访问”文字改成“不公开访问”,避免小白用户误解 2024-05-03 17:09:37 +08:00
刘祥超
e81e575ec1 优化缓存策略表单 2024-05-03 16:31:13 +08:00
刘祥超
0c6985d3f3 安装MySQL时优先使用apt-get代替apt 2024-05-03 15:59:42 +08:00
刘祥超
1af8816c1f 允许单个账号在同一个IP登录多个客户端 2024-05-03 12:09:27 +08:00
刘祥超
f7004b3fb0 版本号修改为1.3.8.2 2024-05-03 11:21:24 +08:00
刘祥超
0c949918eb 使用edge-admin upgrade时自动执行本地安装的edge-api upgrade 2024-05-03 11:20:05 +08:00
刘祥超
09e2433cb5 在线升级时自动执行本地安装的edge-api upgrade 2024-05-03 11:04:19 +08:00
刘祥超
32b2b9923b 自定义页面增加是否“启用系统自定义页面”选项 2024-05-03 09:34:58 +08:00
刘祥超
073890c843 默认不启用MMAP 2024-05-01 12:51:24 +08:00
刘祥超
44765ed970 Dockerfile版本号修改为1.3.8 2024-05-01 08:53:53 +08:00
刘祥超
39bd6264e7 版本号修改为1.3.8 2024-04-30 19:51:35 +08:00
刘祥超
8a480d296f 可以在集群设置中修改节点最大并发读/写数 2024-04-30 19:51:30 +08:00
393 changed files with 2405 additions and 769 deletions

View File

@@ -53,11 +53,5 @@
* [API节点](https://github.com/TeaOSLab/EdgeAPI)
* [管理平台](https://github.com/TeaOSLab/EdgeAdmin)
## 联系我们
有什么问题和建议都可以加入 [Telegram群](https://t.me/+5kVCMGxQhZxiODY9)
## 企业版
* [GoEdge企业版](https://goedge.cn/commercial) - 功能更强大的CDN系统
## 感谢
* 感谢 [Gitee](https://gitee.com/) 提供国内源代码托管平台

View File

@@ -9,8 +9,11 @@ import (
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/TeaOSLab/EdgeAdmin/internal/gen"
"github.com/TeaOSLab/EdgeAdmin/internal/nodes"
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
"github.com/TeaOSLab/EdgeAdmin/internal/utils"
executils "github.com/TeaOSLab/EdgeAdmin/internal/utils/exec"
_ "github.com/TeaOSLab/EdgeAdmin/internal/web"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/settings/updates/updateutils"
_ "github.com/TeaOSLab/EdgeCommon/pkg/langs/messages"
"github.com/iwind/TeaGo/Tea"
_ "github.com/iwind/TeaGo/bootstrap"
@@ -156,6 +159,9 @@ func main() {
for range ticker.C {
if manager.IsDownloading() {
if !isStarted {
if len(manager.NewVersion()) == 0 {
continue
}
log.Println("start downloading v" + manager.NewVersion() + " ...")
isStarted = true
}
@@ -176,6 +182,18 @@ func main() {
log.Println("upgrade failed: " + err.Error())
return
}
// try to exec local 'edge-api upgrade'
rpcClient, err := rpc.SharedRPC()
if err == nil {
exePath, ok := updateutils.CheckLocalAPINode(rpcClient, rpcClient.Context(0))
if ok && len(exePath) > 0 {
log.Println("upgrading database ...")
var cmd = executils.NewCmd(exePath, "upgrade")
_ = cmd.Run()
}
}
log.Println("finished!")
log.Println("restarting ...")
app.RunRestart()

View File

@@ -1,7 +1,7 @@
FROM --platform=linux/amd64 alpine:latest
LABEL maintainer="goedge.cdn@gmail.com"
ENV TZ "Asia/Shanghai"
ENV VERSION 1.3.7
ENV VERSION 1.3.8
ENV ROOT_DIR /usr/local/goedge
ENV TAR_FILE edge-admin-linux-amd64-plus-v${VERSION}.zip

2
go.mod
View File

@@ -14,6 +14,7 @@ require (
github.com/quic-go/quic-go v0.42.0
github.com/shirou/gopsutil/v3 v3.22.5
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/tdewolff/minify/v2 v2.20.20
github.com/tealeg/xlsx/v3 v3.2.3
github.com/xlzd/gotp v0.1.0
golang.org/x/crypto v0.22.0
@@ -37,6 +38,7 @@ require (
github.com/quic-go/qpack v0.4.0 // indirect
github.com/rogpeppe/fastuuid v1.2.0 // indirect
github.com/shabbyrobe/xmlwriter v0.0.0-20200208144257-9fca06d00ffa // indirect
github.com/tdewolff/parse/v2 v2.7.13 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect

13
go.sum
View File

@@ -28,8 +28,6 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f h1:f00RU+zOX+B3rLAmMMkzHUF2h1z4DeYR9tTCvEq2REY=
github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
github.com/iwind/TeaGo v0.0.0-20240312020455-6f20b5121caf h1:WA9qgiynESu/DDTnLH6npRI5AK6UL9qwJ2YZ5qhJX5E=
github.com/iwind/TeaGo v0.0.0-20240312020455-6f20b5121caf/go.mod h1:SfqVbWyIPdVflyA6lMgicZzsoGS8pyeLiTRe8/CIpGI=
github.com/iwind/TeaGo v0.0.0-20240429060313-31a7bc8e9cc9 h1:lqSd+OeAMzPlejoVtsmHJEeQ6/MWXCr+Ws2eX9/Rewg=
github.com/iwind/TeaGo v0.0.0-20240429060313-31a7bc8e9cc9/go.mod h1:SfqVbWyIPdVflyA6lMgicZzsoGS8pyeLiTRe8/CIpGI=
github.com/iwind/gosock v0.0.0-20211103081026-ee4652210ca4 h1:VWGsCqTzObdlbf7UUE3oceIpcEKi4C/YBUszQXk118A=
@@ -72,12 +70,17 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tdewolff/minify/v2 v2.20.20 h1:vhULb+VsW2twkplgsawAoUY957efb+EdiZ7zu5fUhhk=
github.com/tdewolff/minify/v2 v2.20.20/go.mod h1:GYaLXFpIIwsX99apQHXfGdISUdlA98wmaoWxjT9C37k=
github.com/tdewolff/parse/v2 v2.7.13 h1:iSiwOUkCYLNfapHoqdLcqZVgvQ0jrsao8YYKP/UJYTI=
github.com/tdewolff/parse/v2 v2.7.13/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA=
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo=
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8=
github.com/tealeg/xlsx/v3 v3.2.3 h1:MXnVh+9Y8cUglowItTy2HL3Kv6z+q/0aNjeKuTsVqZQ=
github.com/tealeg/xlsx/v3 v3.2.3/go.mod h1:0hGmAEoZ48SS1ZAE6eqZJkJVXgOMY+8a33vjXa8S8HA=
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
github.com/xlzd/gotp v0.0.0-20181030022105-c8557ba2c119 h1:YyPWX3jLOtYKulBR6AScGIs74lLrJcgeKRwcbAuQOG4=
github.com/xlzd/gotp v0.0.0-20181030022105-c8557ba2c119/go.mod h1:/nuTSlK+okRfR/vnIPqR89fFKonnWPiZymN5ydRJkX8=
github.com/xlzd/gotp v0.1.0 h1:37blvlKCh38s+fkem+fFh7sMnceltoIEBYTVXyoa5Po=
github.com/xlzd/gotp v0.1.0/go.mod h1:ndLJ3JKzi3xLmUProq4LLxCuECL93dG9WASNLpHz8qg=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
@@ -88,8 +91,6 @@ golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw=
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ=
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=

View File

@@ -0,0 +1,51 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package configs
import (
"fmt"
"github.com/iwind/TeaGo/Tea"
"github.com/iwind/TeaGo/dbs"
"gopkg.in/yaml.v3"
"net/url"
"os"
)
type SimpleDBConfig struct {
User string `yaml:"user"`
Password string `yaml:"password"`
Database string `yaml:"database"`
Host string `yaml:"host"`
BoolFields []string `yaml:"boolFields,omitempty"`
}
func (this *SimpleDBConfig) GenerateOldConfig(targetFile string) error {
var dbConfig = &dbs.DBConfig{
Driver: "mysql",
Dsn: url.QueryEscape(this.User) + ":" + url.QueryEscape(this.Password) + "@tcp(" + this.Host + ")/" + url.PathEscape(this.Database) + "?charset=utf8mb4&timeout=30s&multiStatements=true",
Prefix: "edge",
}
dbConfig.Models.Package = "internal/db/models"
var config = &dbs.Config{
DBs: map[string]*dbs.DBConfig{
Tea.Env: dbConfig,
},
}
config.Default.DB = Tea.Env
config.Fields = map[string][]string{
"bool": this.BoolFields,
}
oldConfigYAML, encodeErr := yaml.Marshal(config)
if encodeErr != nil {
return encodeErr
}
err := os.WriteFile(targetFile, oldConfigYAML, 0666)
if err != nil {
return fmt.Errorf("create database config file failed: %w", err)
}
return nil
}

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
//go:build !plus
package teaconst

View File

@@ -1,17 +1,15 @@
package teaconst
const (
Version = "1.3.7"
Version = "1.3.9"
APINodeVersion = "1.3.7"
APINodeVersion = "1.3.9"
ProductName = "Edge Admin"
ProcessName = "edge-admin"
ProductNameZH = "Edge"
ProductName = "Edge Admin"
ProcessName = "edge-admin"
Role = "admin"
EncryptKey = "8f983f4d69b83aaa0d74b21a212f6967"
EncryptMethod = "aes-256-cfb"
CookieSID = "geadsid"

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
//go:build !plus
package teaconst

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package teaconst

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package gen
@@ -39,7 +39,7 @@ func generateComponentsJSFile() error {
} else {
webRoot = Tea.Root + "/web/public/js/components/"
}
f := files.NewFile(webRoot)
var f = files.NewFile(webRoot)
f.Range(func(file *files.File) {
if !file.IsFile() {
@@ -53,6 +53,7 @@ func generateComponentsJSFile() error {
logs.Error(err)
return
}
buffer.Write(data)
buffer.Write([]byte{'\n', '\n'})
})

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package gen

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package goman

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package goman

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package goman

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
//go:build !plus
package nodes

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package nodes
@@ -73,7 +73,7 @@ func (this *SessionManager) Read(sid string) map[string]string {
func (this *SessionManager) WriteItem(sid string, key string, value string) bool {
// 删除缓存
defer ttlcache.DefaultCache.Delete( "SESSION@" + sid)
defer ttlcache.DefaultCache.Delete("SESSION@" + sid)
// 忽略OTP
if strings.HasSuffix(sid, "_otp") {
@@ -99,7 +99,7 @@ func (this *SessionManager) WriteItem(sid string, key string, value string) bool
func (this *SessionManager) Delete(sid string) bool {
// 删除缓存
defer ttlcache.DefaultCache.Delete( "SESSION@" + sid)
defer ttlcache.DefaultCache.Delete("SESSION@" + sid)
// 忽略OTP
if strings.HasSuffix(sid, "_otp") {

View File

@@ -385,6 +385,10 @@ func (this *RPCClient) LoginSessionRPC() pb.LoginSessionServiceClient {
return pb.NewLoginSessionServiceClient(this.pickConn())
}
func (this *RPCClient) LoginTicketRPC() pb.LoginTicketServiceClient {
return pb.NewLoginTicketServiceClient(this.pickConn())
}
func (this *RPCClient) NodeTaskRPC() pb.NodeTaskServiceClient {
return pb.NewNodeTaskServiceClient(this.pickConn())
}

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package tasks

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package apinodeutils

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package apinodeutils

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package apinodeutils

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package apinodeutils_test

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package apinodeutils

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package dateutils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils_test

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package executils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package executils_test

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package utils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package utils_test

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package utils_test

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
//go:build !plus
package nodelogutils

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package numberutils_test

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package sizes

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package sizes_test

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils_test

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils_test

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package accesskeys

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package accesskeys

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package cluster

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package cluster

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package cluster

View File

@@ -48,6 +48,7 @@ func init() {
Get("/logs", new(node.LogsAction)).
Post("/start", new(node.StartAction)).
Post("/stop", new(node.StopAction)).
Post("/uninstall", new(node.UninstallAction)).
Post("/up", new(node.UpAction)).
Post("/updateIsOn", new(node.UpdateIsOnAction)).
Get("/detail", new(node.DetailAction)).

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package nodeutils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
//go:build !plus
package nodeutils

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package cache

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package ddosProtection

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package ddosProtection

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package dns

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package ssh

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package ssh

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package system

View File

@@ -0,0 +1,32 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package node
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
type UninstallAction struct {
actionutils.ParentAction
}
func (this *UninstallAction) RunPost(params struct {
NodeId int64
}) {
resp, err := this.RPC().NodeRPC().UninstallNode(this.AdminContext(), &pb.UninstallNodeRequest{NodeId: params.NodeId})
if err != nil {
this.ErrorPage(err)
return
}
// 创建日志
defer this.CreateLogInfo(codes.Node_LogUninstallNodeRemotely, params.NodeId)
if resp.IsOk {
this.Success()
}
this.Fail("执行失败:" + resp.Error)
}

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
//go:build !plus
package node

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package ddosProtection

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package ddosProtection
@@ -34,7 +34,7 @@ func (this *StatusAction) RunPost(params struct {
}) {
results, err := nodeutils.SendMessageToCluster(this.AdminContext(), params.ClusterId, messageconfigs.MessageCodeCheckLocalFirewall, &messageconfigs.CheckLocalFirewallMessage{
Name: "nftables",
}, 10)
}, 10, false)
if err != nil {
this.ErrorPage(err)
return

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package dns

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package globalServerConfig
@@ -110,6 +110,7 @@ func (this *IndexAction) RunPost(params struct {
HttpAllNodeIPShowPage bool
HttpAllEnableServerAddrVariable bool
HttpAllRequestOriginsWithEncodings bool
HttpAllXFFMaxAddresses int
HttpAllDomainAuditingIsOn bool
HttpAllDomainAuditingPrompt string
@@ -219,6 +220,7 @@ func (this *IndexAction) RunPost(params struct {
config.HTTPAll.LnRequestSchedulingMethod = params.HttpAllLnRequestSchedulingMethod
config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable
config.HTTPAll.RequestOriginsWithEncodings = params.HttpAllRequestOriginsWithEncodings
config.HTTPAll.XFFMaxAddresses = params.HttpAllXFFMaxAddresses
// 访问日志
config.HTTPAccessLog.IsOn = params.HttpAccessLogIsOn

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package health

View File

@@ -114,6 +114,8 @@ func (this *IndexAction) RunGet(params struct {
"autoInstallNftables": cluster.AutoInstallNftables,
"autoSystemTuning": cluster.AutoSystemTuning,
"autoTrimDisks": cluster.AutoTrimDisks,
"maxConcurrentReads": cluster.MaxConcurrentReads,
"maxConcurrentWrites": cluster.MaxConcurrentWrites,
"sshParams": sshParams,
"domainName": fullDomainName,
}
@@ -143,6 +145,8 @@ func (this *IndexAction) RunPost(params struct {
AutoInstallNftables bool
AutoSystemTuning bool
AutoTrimDisks bool
MaxConcurrentReads int32
MaxConcurrentWrites int32
Must *actions.Must
}) {
@@ -200,6 +204,8 @@ func (this *IndexAction) RunPost(params struct {
AutoSystemTuning: params.AutoSystemTuning,
AutoTrimDisks: params.AutoTrimDisks,
SshParamsJSON: sshParamsJSON,
MaxConcurrentReads: params.MaxConcurrentReads,
MaxConcurrentWrites: params.MaxConcurrentWrites,
})
if err != nil {
this.ErrorPage(err)

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package metrics

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package metrics

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package metrics

View File

@@ -26,7 +26,7 @@ func (this *StatusAction) RunPost(params struct {
Must *actions.Must
}) {
results, err := nodeutils.SendMessageToCluster(this.AdminContext(), params.ClusterId, messageconfigs.MessageCodeCheckSystemdService, &messageconfigs.CheckSystemdServiceMessage{}, 10)
results, err := nodeutils.SendMessageToCluster(this.AdminContext(), params.ClusterId, messageconfigs.MessageCodeCheckSystemdService, &messageconfigs.CheckSystemdServiceMessage{}, 10, false)
if err != nil {
this.ErrorPage(err)
return

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package cluster

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
//go:build !plus
package clusterutils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package clusterutils

View File

@@ -81,6 +81,8 @@ func (this *CreateAction) RunPost(params struct {
AutoInstallNftables bool
AutoSystemTuning bool
AutoTrimDisks bool
MaxConcurrentReads int32
MaxConcurrentWrites int32
// DNS相关
DnsDomainId int64
@@ -151,6 +153,8 @@ func (this *CreateAction) RunPost(params struct {
AutoInstallNftables: params.AutoInstallNftables,
AutoSystemTuning: params.AutoSystemTuning,
AutoTrimDisks: params.AutoTrimDisks,
MaxConcurrentReads: params.MaxConcurrentReads,
MaxConcurrentWrites: params.MaxConcurrentWrites,
})
if err != nil {
this.ErrorPage(err)

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package grants

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package logs

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package logs

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package logs

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package logs

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package logs

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package clusters

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package clusters

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package clusters

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package regions

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package regions

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package clusters

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package dashboardutils

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package dashboard
@@ -92,13 +92,16 @@ func (this *IndexAction) RunPost(params struct{}) {
"diskUsageWarning": diskUsageWarning,
}
// 今日流量
todayTrafficBytes := int64(0)
// 今日流量和独立IP数
var todayTrafficBytes int64
var todayCountIPs int64
if len(resp.DailyTrafficStats) > 0 {
todayTrafficBytes = resp.DailyTrafficStats[len(resp.DailyTrafficStats)-1].Bytes
var lastDailyTrafficStat = resp.DailyTrafficStats[len(resp.DailyTrafficStats)-1]
todayTrafficBytes = lastDailyTrafficStat.Bytes
todayCountIPs = lastDailyTrafficStat.CountIPs
}
todayTrafficString := numberutils.FormatBytes(todayTrafficBytes)
result := regexp.MustCompile(`^(?U)(.+)([a-zA-Z]+)$`).FindStringSubmatch(todayTrafficString)
var todayTrafficString = numberutils.FormatBytes(todayTrafficBytes)
var result = regexp.MustCompile(`^(?U)(.+)([a-zA-Z]+)$`).FindStringSubmatch(todayTrafficString)
if len(result) > 2 {
this.Data["todayTraffic"] = result[1]
this.Data["todayTrafficUnit"] = result[2]
@@ -107,6 +110,8 @@ func (this *IndexAction) RunPost(params struct{}) {
this.Data["todayTrafficUnit"] = ""
}
this.Data["todayCountIPs"] = todayCountIPs
// 24小时流量趋势
{
statMaps := []maps.Map{}
@@ -137,6 +142,7 @@ func (this *IndexAction) RunPost(params struct{}) {
"countAttackRequests": stat.CountAttackRequests,
"attackBytes": stat.AttackBytes,
"day": stat.Day[4:6] + "月" + stat.Day[6:] + "日",
"countIPs": stat.CountIPs,
})
}
this.Data["dailyTrafficStats"] = statMaps

View File

@@ -1,4 +1,4 @@
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
//go:build !plus
package dashboard

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package dashboard

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package dbnodeutils

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package db

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package db

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package domainutils

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
//go:build !plus
@@ -84,6 +84,8 @@ func (this *CreatePopupAction) RunPost(params struct {
ParamEdgeDNSAPIAccessKeyId string
ParamEdgeDNSAPIAccessKeySecret string
MinTTL int32
Must *actions.Must
CSRF *actionutils.CSRF
}) {
@@ -177,6 +179,7 @@ func (this *CreatePopupAction) RunPost(params struct {
Name: params.Name,
Type: params.Type,
ApiParamsJSON: apiParams.AsJSON(),
MinTTL: params.MinTTL,
})
if err != nil {
this.ErrorPage(err)

View File

@@ -59,6 +59,7 @@ func (this *ProviderAction) RunGet(params struct {
"name": provider.Name,
"type": provider.Type,
"typeName": provider.TypeName,
"minTTL": provider.MinTTL,
"apiParams": apiParams,
"localEdgeDNS": localEdgeDNSMap,
}

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
//go:build !plus
package providers

View File

@@ -1,4 +1,4 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
package providers

View File

@@ -50,6 +50,7 @@ func (this *UpdatePopupAction) RunGet(params struct {
"name": provider.Name,
"type": provider.Type,
"typeName": provider.TypeName,
"minTTL": provider.MinTTL,
"params": apiParams,
}
@@ -114,6 +115,8 @@ func (this *UpdatePopupAction) RunPost(params struct {
ParamEdgeDNSAPIAccessKeyId string
ParamEdgeDNSAPIAccessKeySecret string
MinTTL int32
Must *actions.Must
CSRF *actionutils.CSRF
}) {
@@ -208,6 +211,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
_, err := this.RPC().DNSProviderRPC().UpdateDNSProvider(this.AdminContext(), &pb.UpdateDNSProviderRequest{
DnsProviderId: params.ProviderId,
Name: params.Name,
MinTTL: params.MinTTL,
ApiParamsJSON: apiParams.AsJSON(),
})
if err != nil {

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package files

View File

@@ -1,4 +1,4 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package files

Some files were not shown because too many files have changed in this diff Show More