解决 invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received.

2023/01/31 10:27:56 111.181.19.37:45288 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:27:57 111.181.19.37:45268 rejected common/drain: common/drain: drained connection > 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.
2023/01/31 10:28:00 111.181.19.37:45273 rejected common/drain: common/drain: drained connection > 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.
2023/01/31 10:28:02 111.181.19.37:45279 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:28:15 111.181.19.37:45147 rejected common/drain: common/drain: drained connection > 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.
2023/01/31 10:28:23 111.181.19.37:45258 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:28:25 111.181.19.37:45194 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:28:39 111.181.19.37:45170 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:28:39 111.181.19.37:45242 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:28:40 111.181.19.37:45117 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:28:44 111.181.19.37:45131 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:28:44 111.181.19.37:45104 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:28:45 111.181.19.37:45296 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:29:05 111.181.19.37:45110 rejected common/drain: common/drain: unable to drain connection > read tcp 10.0.0.12:12345->111.181.19.37:45110: i/o timeout > 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.
2023/01/31 10:29:05 111.181.19.37:45275 rejected common/drain: common/drain: unable to drain connection > read tcp 10.0.0.12:12345->111.181.19.37:45275: i/o timeout > 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.
2023/01/31 10:29:10 111.181.19.37:45175 rejected common/drain: common/drain: unable to drain connection > read tcp 10.0.0.12:12345->111.181.19.37:45175: i/o timeout > 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.
2023/01/31 10:29:17 111.181.19.37:45122 rejected common/drain: common/drain: unable to drain connection > read tcp 10.0.0.12:12345->111.181.19.37:45122: i/o timeout > 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.
2023/01/31 10:31:25 111.181.19.37:45099 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:31:27 111.181.19.37:45195 rejected common/drain: common/drain: drained connection > 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.
2023/01/31 10:31:29 111.181.19.37:45214 rejected common/drain: common/drain: drained connection > 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.
2023/01/31 10:31:51 111.181.19.37:45118 rejected common/drain: common/drain: drained connection > 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.
2023/01/31 10:32:07 111.181.19.37:45247 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:32:07 111.181.19.37:45310 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:32:07 111.181.19.37:45170 rejected common/drain: common/drain: unable to drain connection > read tcp 10.0.0.12:12345->111.181.19.37:45170: i/o timeout > 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.
2023/01/31 10:32:12 111.181.19.37:45258 rejected common/drain: common/drain: unable to drain connection > EOF > 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.
2023/01/31 10:32:12 111.181.19.37:45162 rejected common/drain: common/drain: unable to drain connection > EOF > 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.


解决方法:

方法一
将服务端和客户端的 alterID 改成 0 。

方法二
下面操作都在服务端进行,也就是设置环境变量,关闭 AEAD,就这么简单。

首先下面命令,查看v2ray的systemd的详细路径和内容:

systemctl cat v2ray

然后会看到类似下面内容:

# /etc/systemd/system/v2ray.service
[Unit]
Description=V2Ray Service
Documentation=https://www.v2fly.org/
After=network.target nss-lookup.target

[Service]
User=nobody
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/bin/v2ray -config /etc/v2ray/config.json
Restart=on-failure
RestartPreventExitStatus=23

[Install]
WantedBy=multi-user.target

可以看到上面有文件路径:

vi /etc/systemd/system/v2ray.service

然后修改一下,在 Service 区块添加一行:

Environment="V2RAY_VMESS_AEAD_FORCED=false"

然后更新一下systemd服务:

systemctl daemon-reload

最后重启一下v2ray就好了。

systemctl restart v2ray

你可能感兴趣的:(日常错误,VMessAEAD)