Skip to content

Wine: fall back where ws2_32 lacks exports; hook and cfg fixes - #217

Closed
Naitrate wants to merge 1 commit into
Marvisak:mainfrom
Naitrate:wine-host-fallbacks
Closed

Naitrate wants to merge 1 commit into
Marvisak:mainfrom
Naitrate:wine-host-fallbacks

Conversation

@Naitrate

Copy link
Copy Markdown

What

Three small fixes for running VIctory under Wine or Proton. They work with either Linux toolchain, including the one in #191, and are split out of #195, which was closed as a duplicate of #191.

  • Missing Winsock exports: Wine's ws2_32.dll lacks WSAConnectByList and GetAddrInfoExA, and its winhttp.dll lacks WinHttpGetProxySettingsEx. Forwarding to the first two panicked with the host lacks ws2_32.dll!..., so a title call ended the run.
    • WSAConnectByList now tries each vetted candidate in turn with connect when the host has no WSAConnectByList. It blocks, and the timeout isn't honoured.
    • GetAddrInfoExA answers WSAHOST_NOT_FOUND when the host lacks it, as it already does for a blocked name.
    • WinHttpGetProxySettingsEx never reaches the host. The export test exempts all three, and a new test covers the connect fallback.
  • view_format is #[cfg(windows)], like host_resource, its only callee. victory-gpu failed to compile on non-Windows hosts with cannot find function host_resource.
  • .githooks/pre-commit is executable (100755). Git ignored the hook on Linux even after cargo xtask install-hooks reported it as installed, so the asset-policy check never ran on commit.

Why

Found while running VIctory under Wine 11.21 with VKD3D-Proton. only_loopback_is_reachable panicked on ws2_32.dll lacks WSAConnectByList, and a title connecting through WSAConnectByList would end the same way.

Testing

  • Under Wine 11.21 (cross-built for x86_64-pc-windows-msvc), cargo test -p victory-hle passes all 87 tests, including only_loopback_is_reachable and the new connect_by_list_falls_back_to_connect.
  • cargo check -p victory-gpu passes natively on Linux.
  • The commit itself ran through the now-executable hook (asset policy: 3 files ok).

Not run on Windows. There, WSAConnectByList and GetAddrInfoExA still forward to the host as before, since the host exports them.

🤖 Generated with Claude Code

@Bushyon

Bushyon commented Nov 24, 2026

Copy link
Copy Markdown

Tested dbbe37d under Wine on Linux: only_loopback_is_reachable goes from failing to passing, and the new connect_by_list_falls_back_to_connect passes.

Setup: Fedora 44, RX 7800 XT (RADV 26.2.6). Proton Experimental 11.0-20261112 (wine-11.0, vkd3d-proton 2576c0b4a, DXVK dxgi), its own prefix. Debug test binaries cross-built for x86_64-pc-windows-msvc with clang-cl, lld-link and xwin (rustc 1.98.1).

cargo test -p victory-hle --lib:

passed failed
main d2a4bae 85 1 (only_loopback_is_reachable, panics at net.rs:1058)
#217 dbbe37d 87 0

muhammed-aksoy pushed a commit to muhammed-aksoy/VIctory that referenced this pull request Nov 24, 2026
@upipibi upipibi mentioned this pull request Nov 24, 2026
Wine's ws2_32 lacks WSAConnectByList and GetAddrInfoExA, and its winhttp
WinHttpGetProxySettingsEx. Forwarding to the first two panicked (the
host lacks ...). WSAConnectByList now tries each vetted candidate with
connect (blocking, the timeout not kept) where the host has none, and
GetAddrInfoExA answers WSAHOST_NOT_FOUND, as for a blocked name.
WinHttpGetProxySettingsEx never reaches the host. The export test
skips the three only where the host lacks them (it already did so for
WinHttpGetProxySettingsEx); a new test covers the connect fallback.

view_format is Windows-only like host_resource, its only callee, so
victory-gpu builds on non-Windows hosts again.

The pre-commit hook is executable: git skipped it on Linux, where
`cargo xtask install-hooks` said it was installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Marvisak

Copy link
Copy Markdown
Owner

Automated triage for the maintainers. Closing because it is outside the project's scope (VIctory targets Windows hosts; ports, launchers and tooling for other platforms are not being taken).

Out of scope: fallbacks for exports Wine's ws2_32 lacks (real Windows has them), a non-Windows cfg in victory-gpu and the pre-commit hook's file mode, all for running under Wine/Proton on Linux. The network guard is not loosened.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

@Naitrate

Copy link
Copy Markdown
Author

Thanks for taking a look. Nothing was missed: these only matter under Wine, and real Windows hosts have the exports. I'll keep them in my fork.

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