mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-03 15:55:20 -05:00
merge user info inbound metadata
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"v2ray.com/core/app/dispatcher"
|
||||
"v2ray.com/core/common/net"
|
||||
"v2ray.com/core/common/protocol"
|
||||
"v2ray.com/core/common/strmatcher"
|
||||
"v2ray.com/core/proxy"
|
||||
)
|
||||
@@ -282,7 +281,12 @@ func NewUserMatcher(users []string) *UserMatcher {
|
||||
}
|
||||
|
||||
func (v *UserMatcher) Apply(ctx context.Context) bool {
|
||||
user := protocol.UserFromContext(ctx)
|
||||
inbound := session.InboundFromContext(ctx)
|
||||
if inbound == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
user := inbound.User
|
||||
if user == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user