Configuration for an outbound HTTP proxy used by the HTTP client.
Defines the proxy endpoint, optional authentication, and TLS settings. When configured, all outgoing requests are routed through the proxy.
This element is typically used as a child of httpClientConfig.
Example Configuration
configuration:
httpClientConfig:
proxy:
host: localhost
port: 3128
authentication: true
username: alice
password: secret
configuration:
httpClientConfig:
proxy:
host: localhost
port: 3128
authentication: true
username: alice
password: secret
Syntax
proxy:
'$ref': <string>
authentication: <boolean>
host: <string>
password: <string>
port: <number>
ssl: {}
username: <string>
proxy:
'$ref': <string>
authentication: <boolean>
host: <string>
password: <string>
port: <number>
ssl: {}
username: <string>
Attributes
| Name | Required | Default | Description | Examples |
|---|---|---|---|---|
| $ref | false | - | Reference a component defined under components. | - |
| authentication | false | false | Whether to send a Basic Authentication header with proxy requests. If set to true, <username> and <password> must be provided. | - |
| host | false | - | The hostname or IP address of the proxy server. Required for proxy usage. | proxy.example.com |
| password | false | (not set) | Password for authenticating with the proxy server. Only used when authentication="true". | secret |
| port | false | 0 | TCP port on which the proxy server is listening. | 3128 |
| username | false | (not set) | Username for authenticating with the proxy server. Only used when authentication="true". | user |
Child Structure
| Element | Cardinality | Description |
|---|---|---|
| ssl | 0..1 | Configures inbound or outbound SSL connections. |