Feature #75456

add no_proxy configuration option

Added by Sybille Peters over 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2016-04-08
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

TYPO3 has configuration options for proxy:

$GLOBALS['TYPO3_CONF_VARS']['HTTP']['proxy_host']
$GLOBALS['TYPO3_CONF_VARS']['HTTP']['proxy_port']

etc.

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

$GLOBALS['TYPO3_CONF_VARS']['HTTP']['no_proxy'] 

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.

History

#1 Updated by Christian Kuhn over 3 years ago

HTTP_Request2 was removed from v8 about a week ago, see https://review.typo3.org/43508

maybe your setting is supported with guzzle now?

#2 Updated by Christian Kuhn over 3 years ago

  • Status changed from New to Needs Feedback

#3 Updated by Sybille Peters over 3 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 over 3 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
        ]
    ],

#5 Updated by Wouter Wolters over 3 years ago

  • Status changed from Needs Feedback to Closed

We won't change this area in 7.6 and 6.2 anymore because it is a feature request. We do not backport features in stable branches.

For this reason I close the issue as solved.

#6 Updated by Sybille Peters almost 2 years ago

  • Description updated (diff)

Also available in: Atom PDF