diff --git a/proxy/vmess/command/accounts_test.go b/proxy/vmess/command/accounts_test.go index b28c56327..91049bbfb 100644 --- a/proxy/vmess/command/accounts_test.go +++ b/proxy/vmess/command/accounts_test.go @@ -31,6 +31,8 @@ func TestSwitchAccount(t *testing.T) { cmd.Unmarshal(buffer.Bytes()) sa2, ok := cmd.(*SwitchAccount) assert.Bool(ok).IsTrue() + assert.Pointer(sa.Host).IsNil() + assert.Pointer(sa2.Host).IsNil() netassert.Port(sa.Port).Equals(sa2.Port) assert.String(sa.ID).Equals(sa2.ID.String()) assert.Uint16(sa.AlterIds.Value()).Equals(sa2.AlterIds.Value()) diff --git a/proxy/vmess/inbound/command.go b/proxy/vmess/inbound/command.go index 8e5241872..e39915d84 100644 --- a/proxy/vmess/inbound/command.go +++ b/proxy/vmess/inbound/command.go @@ -16,11 +16,10 @@ func (this *VMessInboundHandler) generateCommand(buffer *alloc.Buffer) { tag := this.features.Detour.ToTag if this.space.HasInboundHandlerManager() { handlerManager := this.space.InboundHandlerManager() - handler, availableSec := handlerManager.GetHandler(tag) + handler, availableMin := handlerManager.GetHandler(tag) inboundHandler, ok := handler.(*VMessInboundHandler) if ok { user := inboundHandler.GetUser() - availableMin := availableSec / 60 if availableMin > 255 { availableMin = 255 }