add proxy example

This commit is contained in:
Aleksandr Zelenin 2018-12-24 00:55:29 +03:00
parent 894d79eed3
commit 2532bfc54b

View file

@ -141,6 +141,23 @@ for update := range listener.Updates {
} }
``` ```
### Proxy support
```go
proxyOption := client.WithProxy(&client.AddProxyRequest{
Server: "1.1.1.1",
Port: 1080,
Enable: true,
Type: &client.ProxyTypeSocks5{
Username: "username",
Password: "password",
},
})
tdlibClient, err := client.NewClient(authorizer, proxyOption)
```
## Notes ## Notes
* WIP. Library API can be changed in the future * WIP. Library API can be changed in the future