wwqgtxxMihomo 核心贡献者与 GreatAgent (wwqgtxx-goagent) 开发者
GitHub·2026.09.11 11:10:19(UTC+8)

wwqgtxx:sing-tun forwardICMP 改动存在阻塞风险

wwqgtxx 认为第二处提交的 forwardICMP 虽可能提升性能,但引入更大阻塞风险与重复加锁问题,整体不够稳健。原文见下方引用。

作者原文@wwqgtxx

As a side note, I don't think the changes in the second commit are entirely sound. The forwardICMP section, in particular, appears to boost performance but introduces greater risk. In reality, the ICMPForwarderHandler should return as quickly as possible and avoid any blocking or long-running operations internally; clearly, PrepareConnection offers no guarantee against blocking.

Furthermore, I don't quite understand the addition of s.icmpMu there; DirectRouteMapping is already thread-safe, so what is the purpose of wrapping it in an external lock?