whalechoi:Asterisk 通过受认证的流元数据桥补齐 SOCKS 应用归属

whalechoi 说明,AsteriskMETA、AsteriskBOX、AsteriskNG 的 Hev VPN、ROOT TUN2SOCKS 与 BPF2SOCKS 共用替代实现:helper 经 token 认证的 PROXY v2 桥传递原始源目标元组及可用 UID,避免依赖保留源端口或 DNS 反推。实现已进入相关提交;Hev 通过构建期补丁支持,没有改写其上游仓库。

作者原文

Thanks for investigating the missing app attribution and proposing a fix.

This is now addressed by a shared implementation covering all SOCKS-inbound-based tunnel modes in AsteriskMETA, AsteriskBOX, and AsteriskNG:

  • VPN with Hev
  • ROOT TUN2SOCKS
  • ROOT BPF2SOCKS

The helpers explicitly pass the original source/destination tuple, plus the UID when available, through a token-authenticated PROXY v2 flow-metadata bridge. The core can therefore resolve the original flow's owner without relying on source-port preservation or reconstructing the tuple from loopback addresses and DNS results. Hev support is applied as a build-time patch, without modifying its upstream repository.

The replacement is available in AsteriskMETA df0d930 and AndroidLibClashLite fc5cd55. The proposed service-side tuple reconstruction and socks5.source-port setting are no longer needed.

Closing this PR as superseded, together with AndroidLibClashLite #3.