From 2532bfc54b28f52576ab91934b975d54b2efbf83 Mon Sep 17 00:00:00 2001 From: Aleksandr Zelenin Date: Mon, 24 Dec 2018 00:55:29 +0300 Subject: [PATCH] add proxy example --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index ebaca99..41160ea 100644 --- a/README.md +++ b/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 * WIP. Library API can be changed in the future