mirror of
https://github.com/amnezia-vpn/amnezia-xray-core.git
synced 2026-10-13 21:33:49 +00:00
[PR #21] [MERGED] Add best-effort per-user VLESS fwmarks #24
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amnezia-xray-core#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amnezia-xray-core/pull/21
Author: @FrogRocky
Created: 8/10/2026
Status: ✅ Merged
Merged: 9/24/2026
Merged by: @FrogRocky
Base:
master← Head:frog/rd-35-user-fwmark-best-effort📝 Commits (1)
9e0d112Add best-effort per-user VLESS fwmarks📊 Changes
18 files changed (+420 additions, -5 deletions)
View changed files
➕
app/proxyman/command/user_fwmark_test.go(+24 -0)📝
app/proxyman/outbound/handler.go(+17 -2)➕
app/proxyman/outbound/socket_mark.go(+34 -0)➕
app/proxyman/outbound/socket_mark_test.go(+109 -0)📝
common/protocol/user.go(+3 -0)📝
common/protocol/user.pb.go(+11 -2)📝
common/protocol/user.proto(+2 -0)📝
common/session/context.go(+13 -1)➕
common/session/user_fwmark_test.go(+17 -0)📝
infra/conf/vless.go(+3 -0)📝
infra/conf/vless_test.go(+42 -0)📝
proxy/freedom/freedom.go(+1 -0)➕
proxy/freedom/user_fwmark.go(+21 -0)➕
proxy/freedom/user_fwmark_test.go(+37 -0)📝
proxy/proxy.go(+6 -0)➕
proxy/vless/user_fwmark.go(+12 -0)➕
proxy/vless/user_fwmark_test.go(+65 -0)📝
proxy/vless/validator.go(+3 -0)📄 Description
What
fwmarkto VLESS users, including users added through the Handler API.fwmarkas0or1_000_000_000..uint32 max.Behavior
fwmark: 0preserves the existing static/default routing behavior.SO_MARKfails, Xray logs the socket-option error and continues with the connection, as before.Tests
Tests cover config and API round trips, validation, VLESS/Freedom scoping, call-scoped socket settings, concurrent flows, outbound mux bypass, direct UDP, and Linux compilation.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.