#1656·hysteria

当 QUIC 初始状态超过本地 Egress MTU 时客户端隐藏本地 EMSGSIZE 错误

作者: yupic创建于 2026年8月4日更新于 2026年8月4日
标签bug

To Reproduce

The problem does not require an Android phone or a naturally occurring MTU-1300 mobile network. It can be reproduced in either of these ways:

  1. Unmodified build and a controlled low-MTU route. Use the default 1280-byte Initial and an IPv4 route MTU below 1308 (at most 1307). An isolated Linux network namespace or veth pair with MTU 1300 is sufficient and does not require changing the host's real network interface.
  2. Test build with an intentionally oversized Initial. Set quic.Config.InitialPacketSize to 1452. The failure is reproduced with an IPv4 MTU of 1479 or lower (1452 + 8 UDP + 20 IPv4 > MTU), or an IPv6 MTU of 1499 or lower without extension headers (1452 + 8 UDP + 40 IPv6 > MTU).

quic-go caps InitialPacketSize at 1452, so increasing it cannot reproduce the failure on an IPv4 interface with MTU 1500: the resulting 1480-byte IP packet still fits. If the real interface MTU is too large, create an isolated virtual interface or network namespace with a smaller MTU. For example, MTU 1300 with the default 1280-byte Initial reliably triggers EMSGSIZE.

For example, create a disposable Linux namespace instead of modifying the MTU of the machine's real interface:

内容来源: apernet/hysteria