Skip to content

Commit

Permalink
Updated README with proxy support section
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Jul 25, 2024
1 parent 9597052 commit 46baaad
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,25 @@ client, err = ably.NewRealtime(
)
```

## Proxy support
- `ably-go` doesn't offer proxy option as a separate feature.
- Although, you can set it via environment variables and go will take care of setting it internally.

```
HTTP_PROXY=proxy_url
HTTPS_PROXY=tls_proxy_url
```

- Above configuration should work for both rest and realtime clients.
- For rest client, you can also set proxy by providing custom http client option `ably.WithHTTPClient`.
```go
ably.WithHTTPClient(&http.Client{
Transport: &http.Transport{
Proxy: proxy // custom proxy implementation
},
})
```

## Note on usage of ablytest package
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.
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.
Expand Down

0 comments on commit 46baaad

Please sign in to comment.