Skip to content

fix: inject HTTP proxy env vars into node subprocess calls#1514

Merged
marcelklehr merged 2 commits into
nextcloud:mainfrom
likehopper:fix/proxy-support-installdeps
Jun 15, 2026
Merged

fix: inject HTTP proxy env vars into node subprocess calls#1514
marcelklehr merged 2 commits into
nextcloud:mainfrom
likehopper:fix/proxy-support-installdeps

Conversation

@likehopper

Copy link
Copy Markdown
Contributor

Problem

On Nextcloud installations behind an HTTP proxy, the InstallDeps
repair step fails with ETIMEDOUT errors when downloading
libtensorflow and ffmpeg binaries.

Node subprocesses spawned via exec() do not inherit proxy
environment variables, even when proxy is configured in
Nextcloud's config.php.

Solution

  • Inject IConfig dependency to read the system proxy setting
  • Add getProxyEnv() helper method that builds the proxy env prefix
  • Prepend HTTPS_PROXY and HTTP_PROXY to the exec() commands
    in runTfjsInstall(), runTfjsGpuInstall() and runFfmpegInstall()

Testing

Verified on Nextcloud 33.0.4 behind a Squid proxy (OPNsense)
where installation previously failed with ETIMEDOUT on
storage.googleapis.com.

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>
@likehopper likehopper force-pushed the fix/proxy-support-installdeps branch from e82ce11 to 673ca56 Compare May 31, 2026 23:47

@marcelklehr marcelklehr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nicely done, thank you

@marcelklehr

Copy link
Copy Markdown
Member

Could you please run composer run cs:fix once and commit the result to make sure the code adheres to our coding standards?

@github-actions

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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

@marcelklehr marcelklehr merged commit 2891412 into nextcloud:main Jun 15, 2026
40 of 49 checks passed
@marcelklehr

Copy link
Copy Markdown
Member

Thank you!!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants