phpList / phplist3

Fully functional Open Source email marketing manager for creating, sending, integrating, and analysing email campaigns and newsletters.
https://www.phplist.org
GNU Affero General Public License v3.0
749 stars 269 forks source link

Proxy settings ? #589

Open zazzati opened 5 years ago

zazzati commented 5 years ago

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

samtuke commented 5 years ago

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?

zazzati commented 5 years ago

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 ?

Hartick commented 4 years ago

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