File tree Expand file tree Collapse file tree 11 files changed +284
-150
lines changed
Expand file tree Collapse file tree 11 files changed +284
-150
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Build and Push Images Based on Version
22
33# 在这里定义统一版本号
44env :
5- VERSION : " 2.1.16 "
5+ VERSION : " 2.1.17 "
66
77on :
88 push :
Original file line number Diff line number Diff line change @@ -25,14 +25,14 @@ services:
2525 retries : 10
2626
2727 node-binary-init :
28- image : 0xnetuser/node-binary:2.1.16
28+ image : 0xnetuser/node-binary:2.1.17
2929 container_name : node-binary-init
3030 volumes :
3131 - node_binary:/data/node
3232 restart : " no"
3333
3434 backend :
35- image : 0xnetuser/go-backend:2.1.16
35+ image : 0xnetuser/go-backend:2.1.17
3636 container_name : go-backend
3737 restart : unless-stopped
3838 environment :
@@ -65,7 +65,7 @@ services:
6565 start_period : 10s
6666
6767 frontend :
68- image : 0xnetuser/nextjs-frontend:2.1.16
68+ image : 0xnetuser/nextjs-frontend:2.1.17
6969 container_name : nextjs-frontend
7070 restart : unless-stopped
7171 ports :
Original file line number Diff line number Diff line change 11package dto
22
33type NodeDto struct {
4- Name string `json:"name" binding:"required"`
5- Ip string `json:"ip"`
6- EntryIps string `json:"entryIps"`
7- ServerIp string `json:"serverIp" binding:"required"`
8- PortSta int `json:"portSta"`
9- PortEnd int `json:"portEnd"`
4+ Name string `json:"name" binding:"required"`
5+ Ip string `json:"ip"`
6+ EntryIps string `json:"entryIps"`
7+ ServerIp string `json:"serverIp" binding:"required"`
8+ PortSta int `json:"portSta"`
9+ PortEnd int `json:"portEnd"`
10+ GroupName string `json:"groupName"`
1011}
1112
1213type NodeUpdateDto struct {
13- ID int64 `json:"id" binding:"required"`
14- Name string `json:"name"`
15- Ip string `json:"ip"`
16- EntryIps string `json:"entryIps"`
17- ServerIp string `json:"serverIp"`
18- PortSta * int `json:"portSta"`
19- PortEnd * int `json:"portEnd"`
14+ ID int64 `json:"id" binding:"required"`
15+ Name string `json:"name"`
16+ Ip string `json:"ip"`
17+ EntryIps string `json:"entryIps"`
18+ ServerIp string `json:"serverIp"`
19+ PortSta * int `json:"portSta"`
20+ PortEnd * int `json:"portEnd"`
21+ GroupName * string `json:"groupName"`
2022}
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ type Node struct {
2020 UpdatedTime int64 `gorm:"column:updated_time" json:"updatedTime"`
2121 Status int `gorm:"column:status" json:"status"`
2222 Inx int `gorm:"column:inx" json:"inx"`
23+ GroupName string `gorm:"column:group_name" json:"groupName"`
2324 DisguiseName string `gorm:"column:disguise_name" json:"disguiseName"`
2425 XrayDisguiseName string `gorm:"column:xray_disguise_name" json:"vDisguiseName"`
2526}
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ func GetNodeHealthList() dto.R {
2929 "serverIp" : n .ServerIp ,
3030 "online" : online ,
3131 "version" : n .Version ,
32+ "groupName" : n .GroupName ,
3233 }
3334
3435 if online {
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ func CreateNode(d dto.NodeDto) dto.R {
8686 PortEnd : d .PortEnd ,
8787 Secret : pkg .GenerateSecureSecret (),
8888 Status : 0 ,
89+ GroupName : d .GroupName ,
8990 CreatedTime : time .Now ().UnixMilli (),
9091 UpdatedTime : time .Now ().UnixMilli (),
9192 DisguiseName : disguise ,
@@ -132,6 +133,7 @@ func GetAllNodes() dto.R {
132133 "updatedTime" : n .UpdatedTime ,
133134 "status" : status ,
134135 "inx" : n .Inx ,
136+ "groupName" : n .GroupName ,
135137 "disguiseName" : n .DisguiseName ,
136138 "xrayDisguiseName" : n .XrayDisguiseName ,
137139 }
@@ -194,6 +196,9 @@ func UpdateNode(d dto.NodeUpdateDto) dto.R {
194196 if d .PortEnd != nil {
195197 updates ["port_end" ] = * d .PortEnd
196198 }
199+ if d .GroupName != nil {
200+ updates ["group_name" ] = * d .GroupName
201+ }
197202
198203 if err := DB .Model (& node ).Updates (updates ).Error ; err != nil {
199204 return dto .Err ("更新节点失败" )
You can’t perform that action at this time.
0 commit comments