From a51d64a102d672de453977bb93bb9f7c677c17e3 Mon Sep 17 00:00:00 2001 From: V2Ray Date: Mon, 21 Sep 2015 17:28:48 +0200 Subject: [PATCH] More information when vmess auth fails. --- common/log/log.go | 2 +- proxy/vmess/vmessout.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common/log/log.go b/common/log/log.go index c7c478d1b..1c301c5b5 100644 --- a/common/log/log.go +++ b/common/log/log.go @@ -31,7 +31,7 @@ func writeLog(level LogLevel, prefix, format string, v ...interface{}) string { } else { data = fmt.Sprintf(format, v...) } - log.Print(prefix + data) + log.Println(prefix + data) return data } diff --git a/proxy/vmess/vmessout.go b/proxy/vmess/vmessout.go index d51dbc1f3..dbbec1a1f 100644 --- a/proxy/vmess/vmessout.go +++ b/proxy/vmess/vmessout.go @@ -15,6 +15,10 @@ import ( "github.com/v2ray/v2ray-core/proxy/vmess/protocol/user" ) +const ( + InfoTimeNotSync = "Please check the User ID in your vmess configuration, and make sure the time on your local and remote server are in sync." +) + // VNext is the next Point server in the connection chain. type VNextServer struct { Destination v2net.Destination // Address of VNext server @@ -145,6 +149,7 @@ func handleResponse(conn *net.TCPConn, request *protocol.VMessRequest, output ch nBytes, err := decryptResponseReader.Read(response[:]) if err != nil { log.Error("VMessOut: Failed to read VMess response (%d bytes): %v", nBytes, err) + log.Error(InfoTimeNotSync) return } if !bytes.Equal(response[:], request.ResponseHeader[:]) {