fix: inject HTTP proxy env vars into node subprocess calls#1514
Conversation
When Nextcloud is configured with a proxy (config.php 'proxy' key), node subprocesses spawned via exec() do not inherit proxy settings, causing ETIMEDOUT errors when downloading libtensorflow and ffmpeg binaries on installations behind an HTTP proxy. Fix: read the proxy setting from Nextcloud system config via IConfig and prepend HTTPS_PROXY/HTTP_PROXY env vars to the exec() commands in runTfjsInstall(), runTfjsGpuInstall() and runFfmpegInstall(). Signed-off-by: likehopper <vincent@vignolle.com>
e82ce11 to
673ca56
Compare
|
Could you please run |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
Thank you!! |
Problem
On Nextcloud installations behind an HTTP proxy, the
InstallDepsrepair step fails with
ETIMEDOUTerrors when downloadinglibtensorflow and ffmpeg binaries.
Node subprocesses spawned via
exec()do not inherit proxyenvironment variables, even when
proxyis configured inNextcloud's
config.php.Solution
IConfigdependency to read the system proxy settinggetProxyEnv()helper method that builds the proxy env prefixHTTPS_PROXYandHTTP_PROXYto theexec()commandsin
runTfjsInstall(),runTfjsGpuInstall()andrunFfmpegInstall()Testing
Verified on Nextcloud 33.0.4 behind a Squid proxy (OPNsense)
where installation previously failed with ETIMEDOUT on
storage.googleapis.com.