We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parentsb31ad9a +660bf6b commitbfe86fdCopy full SHA for bfe86fd
src/Client.php
@@ -119,6 +119,7 @@ class Client
119
* @type Filesystem $fs Filesystem for storage of static data
120
* @type string $basePath The base path for the filesystem (used to store account information and csr / keys
121
* @type string $username The acme username
122
+ * @type string $source_ip The source IP for Guzzle (via curl.options) to bind to (defaults to 0.0.0.0 [OS default])
123
* }
124
*/
125
publicfunction__construct($config = [])
@@ -368,9 +369,12 @@ protected function getHttpClient()
368
369
{
370
if ($this->httpClient ===null) {
371
$this->httpClient =newHttpClient([
-'base_uri' => (
372
+'base_uri'=> (
373
($this->getOption('mode',self::MODE_LIVE) ==self::MODE_LIVE) ?
374
self::DIRECTORY_LIVE :self::DIRECTORY_STAGING),
375
+'curl.options' => [
376
+'CURLOPT_INTERFACE' =>$this->getOption('source_ip','0.0.0.0')
377
+ ]
378
]);
379
}
380
return$this->httpClient;