<?php
// Get the proxy info. getEnv returns false if environment var is not found
$ss_outbound_proxy = Environment::getEnv('SS_OUTBOUND_PROXY');
$ss_outbound_proxy_port = Environment::getEnv('SS_OUTBOUND_PROXY_PORT');
// Set the curl proxy variable
if ($ss_outbound_proxy && $ss_outbound_proxy_port) {
$proxy = 'https://' . $ss_outbound_proxy.':'.$ss_outbound_proxy_port;
curl_setopt($ch, CURLOPT_PROXY, $proxy);
}
// Set the curl proxy variable in the _config.php
if ($ss_outbound_proxy && $ss_outbound_proxy_port) {
putenv('http_proxy=' . $ss_outbound_proxy.':'.$ss_outbound_proxy_port);
putenv('https_proxy=' . $ss_outbound_proxy.':'.$ss_outbound_proxy_port);
}