chatgpt-telegram icon indicating copy to clipboard operation
chatgpt-telegram copied to clipboard

Hope to add support for http proxy

Open xmbhjQAQ opened this issue 2 years ago • 2 comments

In some application environments, I can only connect to the telegram through the proxy. This means that the global proxy needs to be opened, which will affect the running of other programs

xmbhjQAQ avatar Dec 08 '22 00:12 xmbhjQAQ

url_i := url.URL{} url_proxy, err := url_i.Parse("http://127.0.0.1:1087") bot, err := tgbotapi.NewBotAPIWithClient(os.Getenv("TELEGRAM_TOKEN"), tgbotapi.APIEndpoint, &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(url_proxy)}})

creantan avatar Dec 08 '22 02:12 creantan

https://github.com/m1guelpf/chatgpt-telegram/pull/38

This pull request support socks5 proxy

zh4n7wm avatar Dec 08 '22 10:12 zh4n7wm