refactor(network): Remove obsolete HTTP Proxy option#3009
Conversation
|
| 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
fd4ed7a to
29f538f
Compare
|
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? |
|
Not needed IMHO. |
|
|
||
| // HTTP Proxy | ||
| GameWindow *textEntryHTTPProxy = TheWindowManager->winGetWindowFromId(nullptr, NAMEKEY("OptionsMenu.wnd:TextEntryHTTPProxy")); | ||
| NameKeyType textEntryHTTPProxyID = TheNameKeyGenerator->nameToKey("OptionsMenu.wnd:TextEntryHTTPProxy"); |
There was a problem hiding this comment.
Better put a tweak comment here that this stuff was removed and obsoleted by us for reasons.
|
Have you validated that the game actually respects the OS proxy settings? Also we should consider |
|
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. |
| uStr.translate(proxy.c_str()); | ||
| GadgetTextEntrySetText(textEntryHTTPProxy, uStr); | ||
| } | ||
| textEntryHTTPProxy->winHide(TRUE); |
There was a problem hiding this comment.
I think this code here can go behind the ENABLE_GUI_HACKS define because the best fix for hide is to remove these elements from the WND data files.
What this code did:
The
TextEntryHTTPProxyoption inOptionsMenu.cpp:Proxy) inHKLM\SOFTWARE\Electronic Arts\EA Games\Command and Conquer Generals Zero Hour.ghttpSetProxy()for HTTP web requests (MOTD news bulletins and patch checks).Background & Reason for Removal:
textEntryHTTPProxy->winHide(TRUE)in C++ hides the obsolete setting from the Options menu without breaking custom/legacy.wndlayout assets.HKEY_LOCAL_MACHINE(HKLM) that caused Windows UAC permission failures (ERROR_ACCESS_DENIED) when playing without Administrator privileges on certain variants of Windows.