Skip to content

Outbound: Fix sendthrough srcip precheck#4750

Merged
RPRX merged 4 commits intoXTLS:mainfrom
ImAubrey:main
Jun 6, 2025
Merged

Outbound: Fix sendthrough srcip precheck#4750
RPRX merged 4 commits intoXTLS:mainfrom
ImAubrey:main

Conversation

@ImAubrey
Copy link
Contributor

fix file check bug

@Fangliding Fangliding changed the title Update xray.go Outbound: Fix sendthrough srcip precheck May 23, 2025
ImAubrey and others added 2 commits May 31, 2025 02:35
fix(proxy/freedom): prevent crash when passthrough is "origin" or "srcip"

In certain routing scenarios, outbound detour tags like "origin" or "srcip" may be assigned 
to freedom handlers without proper initialization, causing nil pointer dereference during Dial().

This patch adds guard checks to ensure the outbound handler is valid before dialing, and improves 
fallback logic for local address passthrough (e.g., 127.0.0.1) to avoid kernel crashes.

Also ensures `sendThrough` behavior gracefully degrades if loopback or empty DNS response is encountered.
@Fangliding
Copy link
Member

要把所用ip打出来的话还是放在debug级别吧

@RPRX RPRX merged commit 028e111 into XTLS:main Jun 6, 2025
6 checks passed
@RPRX
Copy link
Member

RPRX commented Jun 6, 2025

既然 @Fangliding approve 了就先合了

maoxikun pushed a commit to maoxikun/Xray-core that referenced this pull request Aug 23, 2025
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
(cherry picked from commit 028e111)
it2konst pushed a commit to it2konst/gametunnel-core that referenced this pull request Mar 1, 2026
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants