m1guelpf / chatgpt-telegram

Run your own GPTChat Telegram bot, with a single command!
MIT License
3.9k stars 560 forks source link

support socks5 proxy #38

Open zh4n7wm opened 1 year ago

m1guelpf commented 1 year ago

I'm confused, doesn't Go automatically inherit the computer's proxy settings? If not, could we make it do that instead?

xros commented 1 year ago

I'm confused, doesn't Go automatically inherit the computer's proxy settings? If not, could we make it do that instead?

No, for some scenarios, we need a proxy client program running on a Linux/MacOS/Windows server, and the program will only open a certain port locally for passing through censored internet. And Go doesn't inherit the computer's proxy settings automatically. For some servers located in the U.S., there will be some issues for connecting to the Telegram API. Sometimes connection could be lost, sometimes DNS failures. We can use a proxy server located in another country to pass through the Internet censorship in the U.S..