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

Closed
Naitrate wants to merge 1 commit from upstream-pr/217 into main
Naitrate commented 2026-11-24 01:32:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Naitrate on 2026-11-24T01:32:21Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6572561505 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/217). Originally posted by [Naitrate](https://github.com/Naitrate) on 2026-11-24T01:32:21Z. --- ## 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](https://claude.com/claude-code)
Bushyon commented 2026-11-24 06:55:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Bushyon on 2026-11-24T02:27:50Z.


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
<!-- greyfinch-sync:Marvisak/VIctory:comment:7120168620 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/217#issuecomment-7120168620). Originally posted by [Bushyon](https://github.com/Bushyon) on 2026-11-24T02:27:50Z. --- 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 |
upstream-sync closed this pull request 2026-11-25 00:05:19 +00:00
Marvisak commented 2026-11-25 00:06:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:00:42Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148037649 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/217#issuecomment-7148037649). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:00:42Z. --- 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 commented 2026-11-25 05:06:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Naitrate on 2026-11-25T04:18:41Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152726657 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/217#issuecomment-7152726657). Originally posted by [Naitrate](https://github.com/Naitrate) on 2026-11-25T04:18:41Z. --- 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.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!217
No description provided.