解决 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
根据提供的引用内容,报错信息是"java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String",这个错误是由于在比较时,将java.util.Date类型和java.lang.String类型进行了比较,导致类型不匹配的异常。解决这个问题的方法是将比较的两个对象的类型统一为相同的类型。 解决方案如下: 1. 确保比较的两个对象的类型相同,可以使用类型转换将java.lang.String类型转换为java.util.Date类型,或者将java.util.Date类型转换为java.lang.String类型,以便进行比较。 2. 如果比较的两个对象分别是数据库中的日期字段和一个字符串,可以使用数据库的日期函数将字符串转换为日期类型,然后再进行比较。 3. 如果比较的两个对象分别是Java代码中的变量,可以使用SimpleDateFormat类将字符串解析为日期对象,或者将日期对象格式化为字符串,然后再进行比较。 下面是一个示例代码,演示了如何解决这个报错: ```java import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class DateComparison { public static void main(String[] args) { String dateString = "2021-01-01"; Date date = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); try { Date parsedDate = dateFormat.parse(dateString); // 将字符串解析为日期对象 if (date.compareTo(parsedDate) > 0) { System.out.println("Date is after parsedDate"); } else if (date.compareTo(parsedDate) < 0) { System.out.println("Date is before parsedDate"); } else { System.out.println("Date is equal to parsedDate"); } } catch (ParseException e) { e.printStackTrace(); } } } ```
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

代码讲故事

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值