TUN inbound: Fix log, CanSpliceCopy, tag, sniffing, and port config issues#5522
TUN inbound: Fix log, CanSpliceCopy, tag, sniffing, and port config issues#5522
Conversation
|
|
Co-authored-by: RPRX <[email protected]>
|
@copilot UDP 的 CanSpliceCopy 也要设为 3,另外 TCP & UDP LogInfo 加上 to (destination),还有把 TCP 的 completed log 删掉 |
… log Co-authored-by: RPRX <[email protected]>
Done in b6f7413. Changed TCP |
|
@copilot |
Co-authored-by: RPRX <[email protected]>
Done in 8a59648. Removed the colon from |
|
@copilot 如果是 TCP/UDP worker 的话它们会重新调用 ContextWithInbound 和 ContextWithContent 所以不受新增代码的影响对吧 |
Yes, that's correct. The TCP/UDP workers in |
|
@copilot 把 log 的 processing connection 改为 processing TCP 或 UDP |
Co-authored-by: RPRX <[email protected]>
Done in 9ac1e98. Changed log messages to "processing TCP" and "processing UDP" respectively. |
|
@copilot 还有个小问题是目前 TUN inbound 也要写 port 但实际上它用不上,这个容易解决吗 |
Co-authored-by: RPRX <[email protected]>
|
@copilot 下面调用的 LoadWithID() 内有 strings.ToLower() 所以这里也加上比较好 |
Co-authored-by: RPRX <[email protected]>
Done in b5d070b. Added |
|
Please conduct a manual verification. The local DNS is performing sniffing correctly; however, "geosite:youtube" in block is not being blocked by any sniffing methods, nor are "geosite:direct" rules functioning as expected. These rules operate without issue in proxy mode, suggesting a problem specific to the tunnel sniffing. |
|
@t-e-s-tweb 我是测试了 tag 匹配没问题的,sniffing 的话如果有的正常有的不正常那应该是其它方面的问题,不过我刚想到一个 |
|
不过感觉与 SingleReader 而非 PacketReader 这件事 #5526 (comment) 无关,@Owersun 你测下 sniffing |
|
@t-e-s-tweb |
|
嗅探器都是抽象成单流处理的 quic嗅探百八十年前就修了 |
|
@t-e-s-tweb 你那边没被 block 的 youtube 是 tcp 还是 udp |
|
@t-e-s-tweb |
|
按理来说不应该啊,SniffingRequest 是正确传入的了,经过 TUN inbound 处理的数据就是纯 TCP/UDP payload @Owersun 测一下看看能不能复现 |
|
I will have a look at domain sniffing. |
|
I've enabled "quic" in the config, like this: and now the domain is properly sniffed from quic connections too (tcp and tls were working before): although there is new message in logs that wasn't there before: don't know how relevant that is, but it seems to appear if quic sniffing is enabled |
这个不应当出现,因为 reader 经过了 TimeoutWrapperReader 的包装
|
|
也就是说 sniffing 没问题吗,倒是发现了奇怪的 Reader is not timeout reader 问题 |
|
@Fangliding TUN inbound 和 sniffing 的文档里需要提醒下浏览器可能会用 QUIC 而不一定是 TCP,建议路由写个 block UDP/443 |
log.ContextWithAccessMessagefor proper access loggingCanSpliceCopyfor both TCP and UDP connections (set to 3)Inbound.Tagsupport by retrieving from contextContent.SniffingRequestsupport by retrieving from contextAlwaysOnInboundHandlerto pass tag and sniffing config through contextCanSpliceCopyto 3 (matching UDP)from:in log messagesOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.