Skip to main content

Introducing Proxy Configuration Support in PHP SDKs

· One min read

We've added support for configuring proxy servers in the generated PHP SDKs.

This update allows API requests to be routed through custom proxy servers, enhancing compatibility with corporate network environments, firewalls, or any setup requiring outbound traffic to pass through a proxy.

What's New?

Proxy configuration is essential for many secure and enterprise environments where direct outbound connections are restricted or monitored. This feature introduces the ability to route HTTP requests made by the SDK through a specified proxy server.

Developers can now configure proxy settings during SDK client initialization using the ProxyConfiguration option.

PHP SDK Client initialization

$client = SdkClientBuilder::init()
->proxyConfiguration(
ProxyConfigurationBuilder::init(address)
->port(8080)
->auth("username", "password")
->authMethod(CURLAUTH_BASIC)
->tunnel(false)
)
->build();

Proxy Configuration Options

  • address: The full address of the proxy server.
  • port: The port on which the proxy server is listening.
  • auth: Credentials for proxy authentication (username and password).
  • authMethod: The authentication method used for the proxy (e.g., CURLAUTH_BASIC, CURLAUTH_DIGEST).
  • tunnel: Indicates whether tunneling should be used for HTTPS requests through the proxy (true or false).