php-ovh icon indicating copy to clipboard operation
php-ovh copied to clipboard

Proxy support?

Open huglester opened this issue 5 years ago • 2 comments

Hello

any plans for Proxy support?

huglester avatar Feb 28 '20 13:02 huglester

Hello, There is no plan for implementing proxy support as of now.

I will leave this issue open if someone want to pick this up.

rbeuque74 avatar Jan 19 '21 21:01 rbeuque74

It is possible to specify a Client class with a proxy:

require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;
use GuzzleHttp\Client;    // Required

$http_client = new Client([
   'timeout' => 30,
   'connect_timeout' =>5,
   'proxy' => 'tcp://a.b.c.d:3128'
]);

$conn = new Api($application_key, $application_secret, $api_endpoint, $consumer_key, $http_client);

See API constructor and GuzzleHttp\Client Documentation for more information

aurel26 avatar Jun 05 '21 06:06 aurel26