Skip to content

Commit

Permalink
Merge pull request #18 from AlexNodex/patch-2
Browse files Browse the repository at this point in the history
sourceIP support
  • Loading branch information
bakkerpeter authored Jul 2, 2020
2 parents b31ad9a + 660bf6b commit bfe86fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class Client
* @type Filesystem $fs Filesystem for storage of static data
* @type string $basePath The base path for the filesystem (used to store account information and csr / keys
* @type string $username The acme username
* @type string $source_ip The source IP for Guzzle (via curl.options) to bind to (defaults to 0.0.0.0 [OS default])
* }
*/
public function __construct($config = [])
Expand Down Expand Up @@ -368,9 +369,12 @@ protected function getHttpClient()
{
if ($this->httpClient === null) {
$this->httpClient = new HttpClient([
'base_uri' => (
'base_uri' => (
($this->getOption('mode', self::MODE_LIVE) == self::MODE_LIVE) ?
self::DIRECTORY_LIVE : self::DIRECTORY_STAGING),
'curl.options' => [
'CURLOPT_INTERFACE' => $this->getOption('source_ip', '0.0.0.0')
]
]);
}
return $this->httpClient;
Expand Down

0 comments on commit bfe86fd

Please sign in to comment.