Skip to content

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)
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