fix: inject HTTP proxy env vars into node subprocess calls#1514
Open
likehopper wants to merge 1 commit into
Open
fix: inject HTTP proxy env vars into node subprocess calls#1514likehopper wants to merge 1 commit into
likehopper wants to merge 1 commit into
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.