diff --git a/common/protocol/errors.go b/common/protocol/errors.go deleted file mode 100644 index a0ff515b..00000000 --- a/common/protocol/errors.go +++ /dev/null @@ -1,10 +0,0 @@ -package protocol - -import ( - "v2ray.com/core/common/errors" -) - -var ( - ErrInvalidUser = errors.New("Invalid user.") - ErrInvalidVersion = errors.New("Invalid version.") -) diff --git a/proxy/vmess/encoding/server.go b/proxy/vmess/encoding/server.go index 8fbb65ed..ff550185 100644 --- a/proxy/vmess/encoding/server.go +++ b/proxy/vmess/encoding/server.go @@ -58,7 +58,7 @@ func (v *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request user, timestamp, valid := v.userValidator.Get(buffer[:protocol.IDBytesLen]) if !valid { - return nil, protocol.ErrInvalidUser + return nil, errors.New("VMess|Server: Invalid user.") } timestampHash := md5.New()