Skip to content

refactor(network): Remove obsolete HTTP Proxy option - #3009

Open
githubawn wants to merge 2 commits into
TheSuperHackers:mainfrom
githubawn:refactor/remove-http-proxy
Open

refactor(network): Remove obsolete HTTP Proxy option#3009
githubawn wants to merge 2 commits into
TheSuperHackers:mainfrom
githubawn:refactor/remove-http-proxy

Conversation

@githubawn

@githubawn githubawn commented Jul 23, 2026

Copy link
Copy Markdown

What this code did:

The TextEntryHTTPProxy option in OptionsMenu.cpp:

  1. Saved/read an HTTP proxy server address from the Windows Registry (Proxy) in HKLM\SOFTWARE\Electronic Arts\EA Games\Command and Conquer Generals Zero Hour.
  2. Configured GameSpy's ghttpSetProxy() for HTTP web requests (MOTD news bulletins and patch checks).

Background & Reason for Removal:

  • Scope Limitation: HTTP Proxy only affects HTTP TCP requests (web bulletins). It does not proxy peer-to-peer UDP game traffic or match sockets.
  • Player Confusion: Players frequently misinterpret "Proxy" in the game options as a full network proxy to route multiplayer matches or bypass UDP firewall rules.
  • GUI Cleanliness: Calling textEntryHTTPProxy->winHide(TRUE) in C++ hides the obsolete setting from the Options menu without breaking custom/legacy .wnd layout assets.
  • UAC & Registry Safety: Eliminates 1 of the 4 runtime write to HKEY_LOCAL_MACHINE (HKLM) that caused Windows UAC permission failures (ERROR_ACCESS_DENIED) when playing without Administrator privileges on certain variants of Windows.

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown

Greptile Summary

Removes the obsolete HTTP proxy integration.

  • Stops loading the registry proxy for in-game and PATCHGET HTTP requests.
  • Removes proxy persistence and runtime configuration from both game options menus.
  • Hides the obsolete proxy input and label in the Generals and Zero Hour interfaces.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
Core/GameEngine/Source/GameNetwork/GameSpy/MainMenuUtils.cpp Removes registry-based proxy configuration before in-game patch and bulletin requests.
Core/Tools/PATCHGET/CHATAPI.cpp Removes registry-based proxy configuration from the standalone patch downloader.
Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp Removes proxy loading and saving and hides the obsolete controls in Generals.
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp Removes proxy loading and saving and hides the obsolete controls in Zero Hour.

Reviews (3): Last reviewed commit: "refactor(network): Put HTTP Proxy option..." | Re-trigger Greptile

@githubawn
githubawn force-pushed the refactor/remove-http-proxy branch from fd4ed7a to 29f538f Compare July 23, 2026 22:06
@xezon

xezon commented Jul 25, 2026

Copy link
Copy Markdown

Instead of removing the http proxy port, would it be possible to repurpose is and bind net packet traffic for game messages hrough it or is that not needed or possible?

@xezon xezon added GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker Network Anything related to network, servers Gen Relates to Generals ZH Relates to Zero Hour labels Jul 25, 2026
@githubawn

Copy link
Copy Markdown
Author

Not needed IMHO.
The common desktop OSs already have this built in if a user wants it with decades of stability work.
We shouldn't add features that could increase latency for everyone else.

@tintinhamans

Copy link
Copy Markdown

Have you validated that the game actually respects the OS proxy settings? Also we should consider http_proxy and https_proxy environment variable support along with command line flags to support e.g. Linux and macOS.

@githubawn

Copy link
Copy Markdown
Author

The original code relied on its own internal registry keys rather than OS settings; it does not follow the OS proxy settings. Will update the description.

Adding http_proxy / https_proxy support would just reintroduce player confusion (thinking it routes P2P game traffic) and unnecessary code complexity.

If someone actually needs to proxy HTTP (or UDP) traffic for this game, better system-level tools and wrappers already exist to handle that far more cleanly.

I'll be happy to add the switch if users report that they need this switch without having superior options already available.

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

// HTTP Proxy
GameWindow *textEntryHTTPProxy = TheWindowManager->winGetWindowFromId(nullptr, NAMEKEY("OptionsMenu.wnd:TextEntryHTTPProxy"));
#if ENABLE_GUI_HACKS
// TheSuperHackers @tweak 26/07/2026 Hide the obsolete HTTP Proxy entry and its label

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also explain why this was obsoleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker Network Anything related to network, servers ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants