V2ray末位认证淘汰机制解决方案
suhang
2023年08月30日

年后MAC客户端V2rayX无法连接,但是同样的配置,安卓的V2rayNG可以正常连接。抓取V2ray连接日志出现以下错误
2022/01/02 16:26:41 127.0.0.1:57634 rejected common/drain: common/drain: unable to drain connection > websocket: close 1000 (normal) > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.

根据V2ray官网链接的描述, 自 2022 年 1 月 1 日起,服务器端将默认禁用对于 MD5 认证信息 的兼容。任何使用 MD5 认证信息的客户端将无法连接到禁用 VMess MD5 认证信息的服务器端。

大致意思就是,旧版本的V2ray客户端连接请求会被新版本服务端拒绝连接

解决方案:
1.修改 /etc/systemd/system/v2ray.service, 在Service下增加一行

Environment="V2RAY_VMESS_AEAD_FORCED=false"

2.重启服务

sudo systemctl daemon-reload
sudo systemctl restart v2ray