HLE: resolve the local machine name to loopback #2001
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2001
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2001"
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?
@necrobytes on GitHub · 2026-11-25 02:38 UTC · original
necrobytes:fix/offline-console-hostname→main· +137 −28 · 2 files · 2 commits · openA title could call Winsock’s
gethostname()successfully, then getWSAHOST_NOT_FOUNDwhen it passed that same name togetaddrinfo(). This fixesVIC-BT-039in #1249.The title still sees the machine’s own hostname. When a forward lookup matches that name, the HLE passes a static
localhoststring to Winsock. This covers the ANSI, Unicode, extended and legacy lookup APIs, including asynchronous requests. The original machine name never goes to the address resolver, and the change adds no names to the connection allowlist.The Windows regression reads the real ANSI and Unicode hostnames, resolves them through the HLE, and checks every returned address for loopback. It also checks the legacy lookup with a case-varied ASCII name and verifies that an unrelated name still returns
WSAHOST_NOT_FOUND.I ran the Windows regression under Wine. On upstream
940d32fthe first lookup returned11001. With the patch, the regression and the existing blocked-name test both passed. The remaining network test fails on both revisions because Wine lacksWSAConnectByList. Native Linux compilation also stops on both revisions atvictory-gpu’s missinghost_resource. Strict Windows MSVC-target Clippy passed for allvictory-hletargets and features. The asset-policy check passed for all 182 tracked files.Claim in #1633
Implemented and tested with Codex.
@DesertGamer on GitHub · 2026-11-25 02:40 UTC · original
`### VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.`
@Calvix2k on GitHub · 2026-11-25 02:47 UTC · original
Independent run on Windows 10 19045:
cargo test -p victory-hle --lib— 144 passed, 0 failed, including your newhostnameround-trip test. Nothing else invictory-hleregressed here.On the change: resolving the machine name to
127.0.0.1keeps the title’s own hostname working while not leaking DNS, which is the right side of the offline rule; the test that an unrelated name still fails is the part worth keeping.@AgneyaK on GitHub · 2026-11-25 02:52 UTC · original
Native Windows result, since the description's runs were under Wine. Windows 11 26300, Rust 1.98.1 MSVC,
b478965merged ontomain940d32f.Unit tests:
cargo test -p victory-hle --lib -- netpasses all 3nettests, includingonly_loopback_is_reachable, the one that fails under Wine for lack ofWSAConnectByList. Also passing:the_local_hostname_resolves_only_to_loopbackandblocked_name_lookups_clear_the_result.In the title (1.0.2.1, Series X profile, diag build): an RTX 3050 laptop, so the tree also has #1763 (NVIDIA stops at boot without it) and a local adapter patch. One 55 s run each from launch through the boot screens, with
VICTORY_LOG=victory_hle::modules::net=debug,info:netlog linesnetwork name lookup blocked destination=<this machine's name>, about 60 s inSo the title does look up its own hostname during boot, and that's the only name lookup it makes in that window. With the PR it gets an answer, and nothing else in the
netmodule fired: no blocked connections, no other lookups. Frames reached in 55 s: 613 vs 627, the same within noise.Not tested: past the first ~55 s (this laptop runs out of memory in the story load), and whether the title then connects to the loopback address it got.
AI use: Claude Code (Claude Opus 5.5) ran these builds and wrote this; the results are from the runs described. The machine name is left out on purpose.
@Marvisak on GitHub · 2026-11-25 09:17 UTC · original · edited 2026-11-25 20:20 UTC
Automated triage for the maintainers.
Needs work: this needs the maintainer's decision (unchanged). The new head
eec4037is only a merge ofmain. The PR's own diff is identical to the previously triaged headb478965.The substance is the same. In
crates/victory-hle/src/modules/net.rs,resolvablebecomeslookup_node/lookup_node_a/lookup_node_w. A forward lookup of the machine's own hostname now succeeds: the name is replaced with the literallocalhostbefore Winsock sees it, ingetaddrinfo,GetAddrInfoW,GetAddrInfoEx{A,W},gethostbynameandWSAAsyncGetHostByName. The real name never reaches a resolver, the connect checks are unchanged, and other names still fail withWSAHOST_NOT_FOUND. By my reading the title still gets only loopback answers and stays offline. The native Windows run in the thread shows the title does look up its own name at boot (#1249,VIC-BT-039).It still needs the maintainer for two reasons:
netmodule, even if only to a loopback answer.[target.'cfg(windows)'.dev-dependencies]windows-sysentry tocrates/victory-hle/Cargo.toml.If the maintainer accepts this relaxation, the code looks sound to me.
CI: passing (
check).Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.