Proxy System Settings still active in MODX3?


I try to use proxy_host and proxy_port System Settings, but the Package Manager doesn’t work behind a Proxy. Is it still active in MODX3? When looking into the code, it doesn’t seems so: Code search results · GitHub

Step to reproduce

Set Proxy via System Settings and try to install/update an Extra via Package Installer in the Manager.

Observed behavior

Package Installer don’t work with/without Proxy Settings and don’t get remote data.

Expected behavior

Package Installer should work with Proxy Settings to search and update Extras.


MODX 3.0.4, Apache, CURL active
Example Script with CURL/file_get_contents works when set with Proxy options.

In MODX 2.x the system setting proxy_host was used by the class modRestCurlClient.

In MODX 3, modRestClient was removed and replaced.
And it looks like the proxy settings are now ignored.

Thank you @halftrainedharry.

I found it only here, where it uses CURL and not the new PSR-7 Service: revolution/core/src/Revolution/Transport/modTransportPackage.php at f197da76b44645172dc3f0eb721961fd4f534c04 · modxcms/revolution · GitHub
Maybe this must be refactored or deleted? :thinking:

So for now i get some questions on this:

  • If the Proxy Settings aren’t avaible on MODX3, should we communicate it in the Docs or inside the System Settings Description? In my case, we upgraded from 2.6.5 to 3.0.4. If i know it earlier, maybe i only upgrade until 2.8.6 to use the Proxy without breaking Changes.
  • Is it possible to add the Proxy back to PSR-7? Maybe a question for @markh.
  • We run MODX on an Windows Apache Server locally as an Intranet Website and need to go through a Proxy for remote Requests. Maybe its oldschool to define the Proxy Settings inside MODX and would be better to add the Proxy on the Apache Level? But i don’t have any Experience on that. If anyone had, i’m very happy to get some ideas.

I’ve never had to use the proxy functionality so wouldn’t even know where to begin to test it, but there do seem to be approaches out there using middleware.

Thanks @markh! I update ParseX and UpgradeMODX to use Proxy inside PHP code. But this is not future proof and get deleted ob update :grinning: For now we disable the Proxy to make MODX work again. I close this, because there are more important things to work on :stuck_out_tongue_winking_eye:

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.