PharosVip:sing-tun ICMP 转发改为有界异步队列以回应审查
针对 wwqgtxx 提出的阻塞与重复加锁风险,PharosVip 表示已将 PrepareConnection 与数据包转发移入有界异步队列,并移除外层 icmpMu;后续继续跨平台测试。此为 mipstack 适配 PR 修订进展,不代表已合并发布。
作者原文@PharosVipAs a side note, I don't think the changes in the second commit are entirely sound. The
forwardICMPsection, in particular, appears to boost performance but introduces greater risk. In reality, theICMPForwarderHandlershould return as quickly as possible and avoid any blocking or long-running operations internally; clearly,PrepareConnectionoffers no guarantee against blocking.Furthermore, I don't quite understand the addition of
s.icmpMuthere;DirectRouteMappingis already thread-safe, so what is the purpose of wrapping it in an external lock?Thank you for pointing this out. I’ve moved PrepareConnection and packet forwarding to a bounded asynchronous queue.
I’ve also removed s.icmpMu. DirectRouteMapping uses its own synchronization, and the worker handles route cleanup when it exits.
I’ll spend some time conducting additional tests across platforms and share the results.





