1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-29 07:16:29 -04:00

log for detour picking

This commit is contained in:
v2ray 2016-01-22 16:48:17 +01:00
parent 98d99a1fd0
commit d8f29f4b5e

View File

@ -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(),