mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added Proxy support for Api Transport (#11968)
This commit is contained in:
@@ -1375,6 +1375,22 @@ function set_curl_proxy($curl)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the proxy url in guzzle format
|
||||
*
|
||||
* @return 'tcp://' + $proxy
|
||||
*/
|
||||
function get_guzzle_proxy()
|
||||
{
|
||||
$proxy = get_proxy();
|
||||
|
||||
$tmp = rtrim($proxy, "/");
|
||||
$proxy = str_replace(array("http://", "https://"), "", $tmp);
|
||||
if (!empty($proxy)) {
|
||||
return 'tcp://' . $proxy;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the proxy url
|
||||
*
|
||||
|
Reference in New Issue
Block a user