Skip to content

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

Open
githubawn wants to merge 1 commit into
TheSuperHackers:mainfrom
githubawn:refactor/remove-http-proxy
Open

refactor(network): Remove obsolete HTTP Proxy option#3009
githubawn wants to merge 1 commit 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

This PR removes the obsolete HTTP proxy option across the game and patch-checking paths.

  • Stops reading and applying the Proxy registry value during GameSpy and PATCHGET HTTP requests.
  • Stops saving proxy configuration from both Generals and Zero Hour option menus.
  • Hides the legacy proxy text field and label while retaining compatibility with existing .wnd layouts.

Confidence Score: 5/5

The PR appears safe to merge with no blocking failures identified.

No blocking failure remains.

Important Files Changed

Filename Overview
Core/GameEngine/Source/GameNetwork/GameSpy/MainMenuUtils.cpp Removes the registry-backed HTTP proxy configuration from the in-game patch and bulletin request path.
Core/Tools/PATCHGET/CHATAPI.cpp Removes the same proxy configuration from the standalone PATCHGET request path.
Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp Removes proxy persistence and hides the obsolete controls in the Generals options menu.
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp Mirrors the options-menu cleanup for Zero Hour.

Reviews (2): Last reviewed commit: "refactor(network): Remove obsolete HTTP ..." | 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.


// HTTP Proxy
GameWindow *textEntryHTTPProxy = TheWindowManager->winGetWindowFromId(nullptr, NAMEKEY("OptionsMenu.wnd:TextEntryHTTPProxy"));
NameKeyType textEntryHTTPProxyID = TheNameKeyGenerator->nameToKey("OptionsMenu.wnd:TextEntryHTTPProxy");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Better put a tweak comment here that this stuff was removed and obsoleted by us for reasons.

@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.

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