Skip to content

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

Open
likehopper wants to merge 1 commit into
nextcloud:mainfrom
likehopper:fix/proxy-support-installdeps
Open

fix: inject HTTP proxy env vars into node subprocess calls#1514
likehopper wants to merge 1 commit into
nextcloud:mainfrom
likehopper:fix/proxy-support-installdeps

Conversation

@likehopper
Copy link
Copy Markdown

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant