1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-04 09:17:32 -05:00

More information when vmess auth fails.

This commit is contained in:
V2Ray 2015-09-21 17:28:48 +02:00
parent 5aa448753d
commit a51d64a102
2 changed files with 6 additions and 1 deletions

View File

@ -31,7 +31,7 @@ func writeLog(level LogLevel, prefix, format string, v ...interface{}) string {
} else { } else {
data = fmt.Sprintf(format, v...) data = fmt.Sprintf(format, v...)
} }
log.Print(prefix + data) log.Println(prefix + data)
return data return data
} }

View File

@ -15,6 +15,10 @@ import (
"github.com/v2ray/v2ray-core/proxy/vmess/protocol/user" "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. // VNext is the next Point server in the connection chain.
type VNextServer struct { type VNextServer struct {
Destination v2net.Destination // Address of VNext server 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[:]) nBytes, err := decryptResponseReader.Read(response[:])
if err != nil { if err != nil {
log.Error("VMessOut: Failed to read VMess response (%d bytes): %v", nBytes, err) log.Error("VMessOut: Failed to read VMess response (%d bytes): %v", nBytes, err)
log.Error(InfoTimeNotSync)
return return
} }
if !bytes.Equal(response[:], request.ResponseHeader[:]) { if !bytes.Equal(response[:], request.ResponseHeader[:]) {