You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
+
### Added
2
+
- Full http/https proxy support with `noProxy` configuration, check [Proxy configuration options](https://github.com/reportportal/client-javascript?tab=readme-ov-file#proxy-configuration-options) for more details.
1
3
2
4
## [5.4.3] - 2025-10-20
3
5
### Added
4
-
- OAuth 2.0 Password Grant authentication, check [Authentication Options](https://github.com/reportportal/client-javascript?tab=readme-ov-file#authentication-options) for more details.
6
+
- OAuth 2.0 Password Grant authentication, check [Authentication options](https://github.com/reportportal/client-javascript?tab=readme-ov-file#authentication-options) for more details.
When creating a client instance, you need to specify the following options.
54
54
55
-
### Authentication Options
55
+
### Authentication options
56
56
57
57
The client supports two authentication methods:
58
58
1.**API Key Authentication** (default)
@@ -67,7 +67,7 @@ Either API key or complete OAuth 2.0 configuration is required to connect to Rep
67
67
| apiKey | Conditional || User's ReportPortal API key from which you want to send requests. It can be found on the profile page of this user. *Required only if OAuth is not configured. |
68
68
| oauth | Conditional || OAuth 2.0 configuration object. When provided, OAuth authentication will be used instead of API key. See OAuth Configuration below. |
69
69
70
-
#### OAuth Configuration
70
+
#### OAuth configuration
71
71
72
72
The `oauth` object supports the following properties:
| headers | Optional | {} | The object with custom headers for internal http client. |
120
120
| debug | Optional | false | This flag allows seeing the logs of the client. Useful for debugging. |
121
121
| isLaunchMergeRequired | Optional | false | Allows client to merge launches into one at the end of the run via saving their UUIDs to the temp files at filesystem. At the end of the run launches can be merged using `mergeLaunches` method. Temp file format: `rplaunch-${launch_uuid}.tmp`. |
122
-
| restClientConfig | Optional | Not set |`axios` like http client [config](https://github.com/axios/axios#request-config). May contain `agent` property for configure [http(s)](https://nodejs.org/api/https.html#https_https_request_url_options_callback) client, and other client options eg. `timeout`. For debugging and displaying logs you can set `debug: true`. Use the `retry` property (number or [`axios-retry`](https://github.com/softonic/axios-retry#options) config) to customise automatic retries. |
122
+
| restClientConfig | Optional | Not set |`axios` like http client [config](https://github.com/axios/axios#request-config). Supports `proxy` and `noProxy` for proxy configuration (see [Proxy configuration](#proxy-configuration)), `agent` property for [http(s)](https://nodejs.org/api/https.html#https_https_request_url_options_callback) clientoptions, `timeout`, `debug: true` for debugging, and `retry` property (number or [`axios-retry`](https://github.com/softonic/axios-retry#options) config) for automatic retries. |
123
123
| launchUuidPrint | Optional | false | Whether to print the current launch UUID. |
124
124
| launchUuidPrintOutput | Optional | 'STDOUT' | Launch UUID printing output. Possible values: 'STDOUT', 'STDERR', 'FILE', 'ENVIRONMENT'. Works only if `launchUuidPrint` set to `true`. File format: `rp-launch-uuid-${launch_uuid}.tmp`. Env variable: `RP_LAUNCH_UUID`. |
125
125
| token | Deprecated | Not set | Use `apiKey` or `oauth` instead. |
@@ -166,6 +166,169 @@ const client = new RPClient({
166
166
167
167
Setting `retry: 0` disables automatic retries.
168
168
169
+
### Proxy configuration
170
+
171
+
The client supports comprehensive proxy configuration for both HTTP and HTTPS requests, including ReportPortal API calls and OAuth token requests. Proxy settings can be configured via `restClientConfig` or environment variables.
The client automatically detects and uses proxy environment variables:
214
+
215
+
```bash
216
+
export HTTPS_PROXY=https://127.0.0.1:8080
217
+
export HTTP_PROXY=http://127.0.0.1:8080
218
+
export NO_PROXY=localhost,127.0.0.1,.local
219
+
```
220
+
221
+
#### Bypassing proxy for specific domains (noProxy)
222
+
223
+
Use the `noProxy` option to exclude specific domains from being proxied. This is useful when some services are accessible directly while others require a proxy.
|`noProxy`|`string`| Comma-separated list of domains to bypass proxy |
323
+
324
+
#### How proxy handling works
325
+
326
+
1.**Per-request proxy decision:** Each request (API or OAuth) determines its proxy configuration based on the target URL
327
+
2.**noProxy checking:** URLs matching `noProxy` patterns bypass the proxy and connect directly
328
+
3.**Default agents for bypassed URLs:** When a URL bypasses proxy, a default HTTP/HTTPS agent is used to prevent automatic proxy detection
329
+
4.**Environment variable support:**`HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are automatically detected and used if no explicit configuration is provided
330
+
5.**Priority:** Explicit configuration takes precedence over environment variables
331
+
169
332
### checkConnect
170
333
171
334
`checkConnect` - asynchronous method for verifying the correctness of the client connection
0 commit comments