3x-ui 式共享节点改造:nodes 状态机 + nodeClients 各自凭据

- 移除 VMess 协议
- VLESS/SS2022 按用户流量统计(AnyTLS 日志解析,SS 节点级)
- sing-box v2ray_api stats 支持
- 内存优化:面板 128M,agent 64M,sing-box 64M
This commit is contained in:
Muse
2026-10-19 22:23:40 +08:00
parent 1678f766ac
commit 084afeb8f4
35 changed files with 2142 additions and 1749 deletions
+3 -1
View File
@@ -24,8 +24,10 @@ func main() {
if err != nil { fail(err) }
defer conn.Close()
var response v2rayapi.QueryStatsResponse
// Query both inbound-level and user-level stats (sing-box requires users
// to be explicitly listed in the v2ray_api stats config).
err = conn.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/QueryStats",
&v2rayapi.QueryStatsRequest{Patterns: []string{"inbound>>>"}}, &response)
&v2rayapi.QueryStatsRequest{Patterns: []string{"inbound>>>", "user>>>"}}, &response)
if err != nil { fail(err) }
result := struct { Stat []struct { Name string `json:"name"`; Value string `json:"value"` } `json:"stat"` }{}
for _, stat := range response.Stat {