mirror of https://github.com/v2ray/v2ray-core
log for detour picking
parent
98d99a1fd0
commit
d8f29f4b5e
|
@ -2,6 +2,7 @@ package inbound
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"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/common/serial"
|
||||||
"github.com/v2ray/v2ray-core/proxy/vmess/command"
|
"github.com/v2ray/v2ray-core/proxy/vmess/command"
|
||||||
)
|
)
|
||||||
|
@ -17,13 +18,14 @@ func (this *VMessInboundHandler) generateCommand(buffer *alloc.Buffer) {
|
||||||
if this.space.HasInboundHandlerManager() {
|
if this.space.HasInboundHandlerManager() {
|
||||||
handlerManager := this.space.InboundHandlerManager()
|
handlerManager := this.space.InboundHandlerManager()
|
||||||
handler, availableMin := handlerManager.GetHandler(tag)
|
handler, availableMin := handlerManager.GetHandler(tag)
|
||||||
|
|
||||||
inboundHandler, ok := handler.(*VMessInboundHandler)
|
inboundHandler, ok := handler.(*VMessInboundHandler)
|
||||||
if ok {
|
if ok {
|
||||||
user := inboundHandler.GetUser()
|
|
||||||
if availableMin > 255 {
|
if availableMin > 255 {
|
||||||
availableMin = 255
|
availableMin = 255
|
||||||
}
|
}
|
||||||
|
log.Info("VMessIn: Pick detour handler for port ", inboundHandler.Port(), " for ", availableMin, " minutes.")
|
||||||
|
user := inboundHandler.GetUser()
|
||||||
saCmd := &command.SwitchAccount{
|
saCmd := &command.SwitchAccount{
|
||||||
Port: inboundHandler.Port(),
|
Port: inboundHandler.Port(),
|
||||||
ID: user.ID.UUID(),
|
ID: user.ID.UUID(),
|
||||||
|
|
Loading…
Reference in New Issue