xcl run: rewrite non-loopback bind to loopback under XCL_NETWORK=0 #1522
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1532"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by OtavioTadeu on 2026-11-24T17:18:58Z.
Hooks
ws2_32!bind(ordinal 2) innetoffunderXCL_NETWORK=0so non-loopback IPv4/IPv6 binds (such as0.0.0.0:3074or[::]) are rewritten to127.0.0.1/::1preserving the requested port, preventing LAN exposure and Windows Firewall prompts. Fixes #568.What is in it
crates/xcl/src/hle/netoff.rs: addbindto import table (ordinal 2) andinstall_system_hooks, addrewrite_bind_to_loopback, and add unit + real Winsock IPv4/IPv6bind+getsocknametestsTested
stable-x86_64-pc-windows-msvc), debug buildcargo test --workspace -- --test-threads=4: 777 passed, 0 failed, 41 ignored (SKIPPED GPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask[no wave64],gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware[no wave64],heap_window_out_of_memory_falls_back_to_the_switch_form[no heap windows])cargo test -p xcl --lib netoff: 3 passed, 0 failedRegression run
scripts/smoke.ps1 -Game retail_title -Seconds 60(mainbaseline vs PR head on NVIDIA GeForce GTX 1660 SUPER):Not tested
AI use
Imported from ivall/xcl. Originally posted by dcastell1 on 2026-11-24T17:34:14Z.
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on
main@9e3831e(baseline 776 passed, 0 failed, 41 ignored on this box):One more passing test than the baseline; rewriting a non-loopback bind to loopback is exercised and green.
Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it. (The PR is a draft; this is the suite as it stands.)
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:05:52Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.Thanks!
Imported from ivall/xcl. Originally posted by throny on 2026-11-24T19:38:14Z.
Two contributors checked independently and found that this PR makes the same change as #570 (for #568): #1607, group D14. They suggest keeping #570. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps.
This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T20:42:39Z.
Closing this as a duplicate: #570 makes the same change and was opened first (under XCL_NETWORK=0 a non-loopback bind is made on loopback). It stays open and is the one that will be reviewed and merged.
This says nothing about the quality of the code here. I compared the two diffs; the pair was also found by independent checks in #1607. If this PR covers a case #570 does not, or #570 is closed without being merged, say so and I'll reopen it. A test that is only here is welcome on #570.
Thank you for the work.
AI use: Claude Code (Claude Opus 5.5) compared the diffs and wrote this comment; the decision is the maintainer's.
Pull request closed