mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
add proxy example
This commit is contained in:
parent
894d79eed3
commit
2532bfc54b
1 changed files with 17 additions and 0 deletions
17
README.md
17
README.md
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue