diff --git a/proxy/vmess/inbound/command.go b/proxy/vmess/inbound/command.go index e39915d84..8e713df11 100644 --- a/proxy/vmess/inbound/command.go +++ b/proxy/vmess/inbound/command.go @@ -2,6 +2,7 @@ package inbound import ( "github.com/v2ray/v2ray-core/common/alloc" + "github.com/v2ray/v2ray-core/common/log" "github.com/v2ray/v2ray-core/common/serial" "github.com/v2ray/v2ray-core/proxy/vmess/command" ) @@ -17,13 +18,14 @@ func (this *VMessInboundHandler) generateCommand(buffer *alloc.Buffer) { if this.space.HasInboundHandlerManager() { handlerManager := this.space.InboundHandlerManager() handler, availableMin := handlerManager.GetHandler(tag) + inboundHandler, ok := handler.(*VMessInboundHandler) if ok { - user := inboundHandler.GetUser() if availableMin > 255 { availableMin = 255 } - + log.Info("VMessIn: Pick detour handler for port ", inboundHandler.Port(), " for ", availableMin, " minutes.") + user := inboundHandler.GetUser() saCmd := &command.SwitchAccount{ Port: inboundHandler.Port(), ID: user.ID.UUID(),