Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Auth/OnlineFederation.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ protected function getSTSUrl( $login ) {
curl_setopt( $cURLHandle, CURLOPT_SSL_VERIFYHOST, 0 );
}

if( $this->settings->proxy ) {
curl_setopt( $cURLHandle, CURLOPT_PROXY, $this->settings->proxy );
}

curl_setopt( $cURLHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
curl_setopt( $cURLHandle, CURLOPT_HTTPHEADER, [ 'Content-Type: application/x-www-form-urlencoded' ] );
curl_setopt( $cURLHandle, CURLOPT_POST, 1 );
Expand Down
8 changes: 8 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,10 @@ public function getSoapResponse( $soapUrl, $content, $throwException = true ) {
curl_setopt( $cURLHandle, CURLOPT_SSL_VERIFYHOST, 0 );
}

if( $this->settings->proxy ) {
curl_setopt( $cURLHandle, CURLOPT_PROXY, $this->settings->proxy );
}

curl_setopt( $cURLHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
curl_setopt( $cURLHandle, CURLOPT_HTTPHEADER, $headers );
curl_setopt( $cURLHandle, CURLOPT_POST, 1 );
Expand Down Expand Up @@ -1955,6 +1959,10 @@ private function retrieveWsdl( $wsdlUrl ) {
curl_setopt( $wsdlCurl, CURLOPT_SSL_VERIFYHOST, 0 );
}

if( $this->settings->proxy ) {
curl_setopt( $wsdlCurl, CURLOPT_PROXY, $this->settings->proxy );
}

$importXML = curl_exec( $wsdlCurl );
$curlInfo = curl_getinfo( $wsdlCurl );
$curlErrNo = curl_errno( $wsdlCurl );
Expand Down
8 changes: 8 additions & 0 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ class Settings {
*/
public $cache = array( "server" => "localhost", "port" => 11211 );

/**
* Proxy with port.
*
* @var string
*/
public $proxy;

/**
* List of CRM regions
*
Expand Down Expand Up @@ -211,6 +218,7 @@ public function __construct( $settings ) {
$this->organizationUniqueName = ( isset( $settings["organizationUniqueName"] ) ) ? $settings["organizationUniqueName"] : null;
$this->organizationId = ( isset( $settings["organizationId"] ) ) ? $settings["organizationId"] : null;
$this->organizationVersion = ( isset( $settings["organizationVersion"] ) ) ? $settings["organizationVersion"] : null;
$this->proxy = ( isset( $settings["proxy"] ) ) ? $settings["proxy"] : null;

if ( $this->authMode === 'OnlineFederation' ) {
$crmRegionId = $serverHostParts[1];
Expand Down