fix(agent): ACL 放行用 auth_user 而非 user(VLESS 运行时只认 auth_user)
生产验证发现:sing-box 1.13 的 route rule 里 user 字段对 VLESS/REALITY 入站运行时不匹配(仅 sing-box check 语法通过),导致放行规则永不命中、 白名单用户也被兜底拒绝。本地真 VLESS 连接实测确认 auth_user 生效 (good→通/bad→block),node 端 git 一进一出白名单验证 per-user 生效。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -195,7 +195,11 @@ func (ac *ACLConfig) rules() []any {
|
||||
if len(uuids) > 0 {
|
||||
for _, t := range targets {
|
||||
r := t.matchFields()
|
||||
r["user"] = uuids
|
||||
// auth_user(非 user):sing-box 1.13 的 route rule 里,VLESS/REALITY 入站的
|
||||
// 认证用户要用 auth_user 匹配 inbound user 的 name;user 字段对 VLESS 运行时
|
||||
// 不生效(仅 sing-box check 语法通过),会导致放行规则永不命中、白名单用户也
|
||||
// 被兜底拒绝。已用本地真 VLESS 连接实测确认(good→通, bad→被 block)。
|
||||
r["auth_user"] = uuids
|
||||
r["outbound"] = directOutboundTag
|
||||
out = append(out, r)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user