2.6-Preview最后一批代码上线

This commit is contained in:
2026-08-07 21:18:28 +08:00
parent 41eb21f512
commit d7c27c513c
12 changed files with 322 additions and 122 deletions
+5
View File
@@ -188,6 +188,11 @@ func UpdateConfigHandler(c *gin.Context) {
}
cfg.TcpMux = true
// AdminPort 已从 JSON 绑定,直接使用
if cfg.AdminPort <= 0 {
cfg.AdminPort = 7400 // 如果前端没传,默认 7400
}
if err := db.UpdateGlobalConfig(&cfg); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"code": 2, "msg": "更新配置失败: " + err.Error()})
return
+1
View File
@@ -95,6 +95,7 @@ const defaultConfig = {
serverAddr: "frp.example.com",
serverPort: 7000,
token: "CHANGE_ME",
adminPort: 7400,
logLevel: "info",
logMaxDays: 3,
tcpMux: true,
+4
View File
@@ -201,6 +201,10 @@
</button>
</div>
</div>
<div class="form-row">
<label>管理端口 (admin_port)</label>
<input type="number" v-model="globalConfig.adminPort" placeholder="7400" />
</div>
</div>
</div>