VLESS Reverse Proxy: Add sniffing to outbound's reverse (which is actually an inbound)#5837
VLESS Reverse Proxy: Add sniffing to outbound's reverse (which is actually an inbound)#5837
sniffing to outbound's reverse (which is actually an inbound)#5837Conversation
Add sniffing config fields to the Reverse message in account.proto and set SniffingRequest in the reverse proxy context when creating the bridge-side reverse handler. Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com> Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/741dccb8-6983-4b67-8767-fd27012ea9f9
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com> Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/741dccb8-6983-4b67-8767-fd27012ea9f9
Use the existing xray.app.proxyman.SniffingConfig as a nested `sniffing` field in the Reverse message, matching the same structure used in ReceiverConfig.sniffing_settings. Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com> Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/a8e72170-3d2f-4590-b486-b9d61a82388b
Add VLessReverseConfig struct with Build() method that uses the existing SniffingConfig.Build() for protocol name validation and normalization. Applied to both inbound client and outbound config parsing paths. Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com> Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/a8e72170-3d2f-4590-b486-b9d61a82388b
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com> Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/a8e72170-3d2f-4590-b486-b9d61a82388b
… restore validation Reuse existing SniffingConfig struct and Build() for config parsing. Don't touch inbound code. Keep outbound tag validation. Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com> Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/16e449e3-972b-4855-8d91-e8f0f5f52d15
|
感觉它配置解析还是有点问题,帮忙改一下 @Fangliding |
|
Inbound reverse 有 sniffing 的话报个错 |
好像就是这样啊 除了AI给下面那个当vnext legacy解析也加可能有点多余了 |
|
GitHub 现在这 copilot 不会直接发起 PR 了,导致 https://github.com/XTLS/Xray-core/agents/pull/5837?session_id=16e449e3-972b-4855-8d91-e8f0f5f52d15
|
|
看不到( sniff这谁提谁测吧( |
|
稍微改了一下, |
|
|
|
outbound.go 里有个 虽然这个直接基于 reverse tag 统计是最方便的,但可能有人想相同 tag、不同 user 吧, |
sniffing to outbound's reverse (which is actually an inbound)
Embed
SniffingConfigin theReverseproto message and wire up config parsing and runtime context propagation.Proto
xray.app.proxyman.SniffingConfig sniffing = 2toReversemessage, reusing the existing typeConfig parsing (
infra/conf/vless.go)VLessReverseConfigstruct reuses existingSniffingConfigand itsBuild()(protocol normalization, domain lowercasing, etc.)Runtime (
proxy/vless/outbound/outbound.go)SniffingRequeston the reverse context whenSniffing.Enabledis trueSubContextFromMuxInbound→BridgeWorker.Dispatch→DefaultDispatcher.DispatchExample config
{ "id": "...", "encryption": "none", "reverse": { "tag": "reverse-in", "sniffing": { "enabled": true, "destOverride": ["http", "tls"], "routeOnly": true } } }