php-ews
php-ews copied to clipboard
proxy settings comes not to guzzle
if I call
$opt = ['version' => 'Exchange2013'
, 'MailboxCulture' => 'de-DE'
, 'timezone' => 'W. Europe Standard Time'
, 'proxy' => [
'http' => 'tcp://proxycluster.xxx.xx:80',
'https' => 'tcp://proxycluster.xxx.xx:80',
]
API::withUsernameAndPassword(..., ..., $opt)
the proxy settings will not used or path through to guzzle, I must patch guzzlehttp\guzzle\src\Client.php
private function configureDefaults(array $config)
{
$defaults = [
'allow_redirects' => RedirectMiddleware::$defaultSettings,
'http_errors' => true,
'decode_content' => true,
'verify' => true,
'cookies' => false,
'idn_conversion' => true,
'proxy' => [
'http' => 'tcp://proxycluster.xxx.xx:80',
'https' => 'tcp://proxycluster.xxx.xx:80',
]
];
Is this the only way to use a proxy or is there any trick for using a proxy without manipulating sources?
Hi,
you can add this to options:
$options['httpPlayback']['proxy']['http'] = 'http://proxyhost:8080';
$options['httpPlayback']['proxy']['https'] = 'http://proxyhost:8080';
API::withUsernameAndPassword($endPoint, $userName, $password, $options),