HLE: reject null handle in WinHttpSetOption proxy path and expand net.rs tests (1 -> 17) #1213

Open
geiyiliyabumo wants to merge 1 commit from upstream-pr/1213 into main
geiyiliyabumo commented 2026-11-24 16:26:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T16:26:31Z.


Summary

Closes #1141

Full verification details and change notes are documented in #1141 (commit d30bed4, based on main ffe310e).

 crates/victory-hle/src/modules/net.rs | 1370 +++++++++++++++++++++++++++++++--
 1 file changed, 1287 insertions(+), 83 deletions(-)

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check on edited files: PASS
  • cargo xtask policy: PASS (zero game files/data)
  • cargo clippy --all-targets --locked -- -D warnings (default + --features diagnostics where applicable): PASS
  • Targeted & crate unit/GPU tests: PASS

AI-assisted; synthetic tests only, no game files.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586480234 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1213). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-24T16:26:31Z. --- ### Summary Closes #1141 Full verification details and change notes are documented in #1141 (commit `d30bed4`, based on `main` `ffe310e`). ```text crates/victory-hle/src/modules/net.rs | 1370 +++++++++++++++++++++++++++++++-- 1 file changed, 1287 insertions(+), 83 deletions(-) ``` ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check` on edited files: **PASS** - `cargo xtask policy`: **PASS** (zero game files/data) - `cargo clippy --all-targets --locked -- -D warnings` (default + `--features diagnostics` where applicable): **PASS** - Targeted & crate unit/GPU tests: **PASS** *AI-assisted; synthetic tests only, no game files.*
Zipettte commented 2026-11-24 18:06:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T17:59:57Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at d30bed4: cargo test -p victory-hle passes, 111 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140009538 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1213#issuecomment-7140009538). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T17:59:57Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at d30bed4: `cargo test -p victory-hle` passes, 111 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Marvisak commented 2026-11-25 02:05:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:18:58Z.


Automated triage for the maintainers.

Thanks for the rebase. The only change outside the tests is in crates/victory-hle/src/modules/net.rs WinHttpSetOption: a WINHTTP_OPTION_PROXY call with a null handle is no longer swallowed but now goes to the host's WinHttpSetOption. The net module is offline by design, and its proxy guard exists so that no proxy setting from the title ever reaches the host. The repo rules close any change that loosens a guard in net, even a narrow one, and this change fixes no observed bug: nothing shows the title making this call or the current answer (1) causing trouble. The remaining ~1,200 lines rewrite and expand the module's tests, most of which open real loopback sockets and WinHTTP sessions. As a test-only PR that leaves the guards as they are, that part could be filed again separately, preferably in smaller pieces.

This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the triage: proposed close label. CI: passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149422187 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1213#issuecomment-7149422187). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:18:58Z. --- <!-- victory-triage v1 head=0fc724aeceb3adca40bc4d80ade9e4a553545cdd verdict=proposed-close at=2026-11-25T02:20:29Z --> Automated triage for the maintainers. Thanks for the rebase. The only change outside the tests is in `crates/victory-hle/src/modules/net.rs` `WinHttpSetOption`: a `WINHTTP_OPTION_PROXY` call with a null handle is no longer swallowed but now goes to the host's `WinHttpSetOption`. The `net` module is offline by design, and its proxy guard exists so that no proxy setting from the title ever reaches the host. The repo rules close any change that loosens a guard in `net`, even a narrow one, and this change fixes no observed bug: nothing shows the title making this call or the current answer (1) causing trouble. The remaining ~1,200 lines rewrite and expand the module's tests, most of which open real loopback sockets and WinHTTP sessions. As a test-only PR that leaves the guards as they are, that part could be filed again separately, preferably in smaller pieces. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the `triage: proposed close` label. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
geiyiliyabumo commented 2026-11-25 03:03:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-25T02:10:42Z.


Rebased cleanly onto \main\ (\ccfb029). \cargo test -p victory-hle --locked modules::net::tests, \cargo clippy -p victory-hle --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7150408751 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1213#issuecomment-7150408751). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-25T02:10:42Z. --- Rebased cleanly onto \main\ (\ccfb029\). \cargo test -p victory-hle --locked modules::net::tests\, \cargo clippy -p victory-hle --all-targets --locked -- -D warnings\, and \cargo xtask policy\ all pass.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1213:upstream-pr/1213'
git switch 'upstream-pr/1213'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1213'
git switch 'upstream-pr/1213'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1213'
git switch 'upstream-pr/1213'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1213'
git switch 'main'
git merge --squash 'upstream-pr/1213'
git switch 'main'
git merge --ff-only 'upstream-pr/1213'
git switch 'main'
git merge 'upstream-pr/1213'
git push origin 'main'
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!1213
No description provided.