瀏覽代碼

better log

v2ray 9 年之前
父節點
當前提交
684e133ac5
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      proxy/shadowsocks/protocol.go

+ 2 - 1
proxy/shadowsocks/protocol.go

@@ -117,7 +117,8 @@ func ReadRequest(reader io.Reader, auth *Authenticator, udp bool) (*Request, err
 	if request.OTA {
 		actualAuth := auth.Authenticate(nil, buffer.Value[0:lenBuffer])
 		if !serial.BytesLiteral(actualAuth).Equals(serial.BytesLiteral(authBytes)) {
-			log.Error("Shadowsocks: Invalid OTA: ", actualAuth)
+			log.Debug("Shadowsocks: Invalid OTA. Expecting ", actualAuth, ", but got ", authBytes)
+			log.Warning("Shadowsocks: Invalid OTA.")
 			return nil, proxy.ErrorInvalidAuthentication
 		}
 	}