add no_proxy configuration option
TYPO3 has configuration options for proxy:
However a no_proxy option is missing, as described for example here: https://wiki.archlinux.org/index.php/proxy_settings
TYPO3 uses the PHP HTTP_Request2 package which also does not use this parameter.
However I think it could be implemented in TYPO3 as an option such as
and used in typo3/sysext/core/Classes/Http/HttpRequest.php to set the proxy-options to empty if the url contains one of the domains set in no_proxy.
The code of TYPO3 6.2 and 8.0 looks pretty much the same here, so it shouldn't be a problem to implement for all versions.
#3 Updated by Sybille Peters almost 4 years ago
Yes indeed, thank you for pointing that out.
And guzzle supports no_proxy (http://docs.guzzlephp.org/en/latest/request-options.html). I'm not sure however, if he will read it from the environment variable no_proxy or if it must be passed by TYPO3. TYPO3 8 version has completely eliminated the proxy options in TYPO3_CONF_VARS.
"Guzzle will automatically populate this value with your environment's NO_PROXY environment variable. However, when providing a proxy request option, it is up to your to provide the no value parsed from the NO_PROXY environment variable (e.g., explode(',', getenv('NO_PROXY')))."
If this will work for me now, I have to check.
#4 Updated by Sybille Peters almost 4 years ago
Ok, I checked and tested, it works perfectly for TYPO3 8 (git version). So I guess, we can close this issue for TYPO3 8.x. (What about TYPO3 6.x and 7.x?)
TYPO3 8:You can either set the parameters in the environment or in localconf, configuration will be applied, wenn GeneralUitilty::getUrl is used.
For localconf there is no possibility to set the proxy options in the install tool though, must be set directly in php file:
'HTTP' => [ 'proxy' => [ 'http' => 'http://somedomain:someport', // Use this proxy with "http" 'https' => 'http://somedomain:someport', // Use this proxy with "https", 'no' => ['someinternaldomain', 'localhost', ...] // Don't use a proxy with these ] ],