mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-22 17:46:48 +08:00
VLESS practice: Use user-sent VLESS UUID's last byte as vlessRoute
for routing
rules
https://github.com/XTLS/Xray-core/pull/5009#issuecomment-3194262087
This commit is contained in:
@@ -128,6 +128,14 @@ func (ctx *Context) GetUser() string {
|
||||
return ctx.Inbound.User.Email
|
||||
}
|
||||
|
||||
// GetVlessRoute implements routing.Context.
|
||||
func (ctx *Context) GetVlessRoute() net.Port {
|
||||
if ctx.Inbound == nil {
|
||||
return 0
|
||||
}
|
||||
return ctx.Inbound.VlessRoute
|
||||
}
|
||||
|
||||
// GetAttributes implements routing.Context.
|
||||
func (ctx *Context) GetAttributes() map[string]string {
|
||||
if ctx.Content == nil {
|
||||
|
Reference in New Issue
Block a user