phplist3 icon indicating copy to clipboard operation
phplist3 copied to clipboard

Proxy settings ?

Open zazzati opened this issue 6 years ago • 3 comments

We have installed phplist on a server farm behind proxy.

Phplist after login try to contact

https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/updateLib.php

$serverUrl = "https://download.phplist.org/version.json";

With php curl, there are no proxy setting in the code:

`
$ch = curl_init();

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_URL, $updateUrl);

$responseFromServer = curl_exec($ch);

curl_close($ch);

`

The request fail with a timed out.

it is possible to plan the insertion in the code of

if ($PROXY_FROM_CONFIG_FILE and $PROXY_PORT_FROM_CONFIG_FILE) {
   curl_setopt($ch, CURLOPT_PROXY, $PROXY_FROM_CONFIG_FILE);    
   curl_setopt($ch, CURLOPT_PROXYPORT,  $PROXY_PORT_FROM_CONFIG_FILE);    
}

or smilar code ?

thx

zazzati avatar Sep 18 '19 13:09 zazzati

I don't see any reason why not. Please can you implement and test this (including adding the new config options to config_extended.php) and open a pull request for review?

samtuke avatar Sep 18 '19 14:09 samtuke

Its seem that variable and constants in config_extended.php are not visibile in application scope.

In config.php i read

** NOTE: To use options from config_extended.php, you need to copy them to this file **

Whats the correct way ?

zazzati avatar Sep 18 '19 16:09 zazzati

Follow this! There are many settings to allow to use of proxy in PHPList?

Hartick avatar Jun 17 '20 13:06 Hartick