Skip to content

Commit 46baaad

Browse files
committed
Updated README with proxy support section
1 parent 9597052 commit 46baaad

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,25 @@ client, err = ably.NewRealtime(
353353
)
354354
```
355355

356+
## Proxy support
357+
- `ably-go` doesn't offer proxy option as a separate feature.
358+
- Although, you can set it via environment variables and go will take care of setting it internally.
359+
360+
```
361+
HTTP_PROXY=proxy_url
362+
HTTPS_PROXY=tls_proxy_url
363+
```
364+
365+
- Above configuration should work for both rest and realtime clients.
366+
- For rest client, you can also set proxy by providing custom http client option `ably.WithHTTPClient`.
367+
```go
368+
ably.WithHTTPClient(&http.Client{
369+
Transport: &http.Transport{
370+
Proxy: proxy // custom proxy implementation
371+
},
372+
})
373+
```
374+
356375
## Note on usage of ablytest package
357376
Although the `ablytest` package is available as a part of ably-go, we do not recommend using it as a sandbox for your own testing, since it's specifically intended for client library SDKs and we don’t provide any guarantees for support or that it will remain publicly accessible.
358377
It can lead to unexpected behaviour, since some beta features may be deployed on the `sandbox` environment so that they can be tested before going into production.

0 commit comments

Comments
 (0)