Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
807 stars 341 forks source link

Proxy support #151

Closed vnikolay closed 4 years ago

vnikolay commented 6 years ago

In Russia Telegram now banned. How to use it through proxy socks5?

Eleirbag89 commented 6 years ago

Take a look at these:

Put the new lines in the sendAPIRequest method, line 3061.

I'll try to implement it myself and push in this repository as soon as i can, as always any pull request are welcome.

vnikolay commented 6 years ago

Yes, I've made it, but it's only temporary measures, because when composer will update the library, this will be vanished. So it's very needed being in the library. Thanks, i'll wait.

Eleirbag89 commented 6 years ago

I have done a quick implementation: https://github.com/Eleirbag89/TelegramBotPHP/commit/d9f896e184fd9df2990e3ab97cdfeb9923be5890. I don't have proxies account so i can't testing it very well, can you give it a try ?

If it's all good i'll do a new release after some clean up.

vnikolay commented 6 years ago

Thanks! I tried, anonym proxy work well, but proxy with authentication doesn't work. I tried two different (socks5). But they might be blocked too for the same reason.

Eleirbag89 commented 6 years ago

Did you try user:password for the authentication param ?

rozblog1388 commented 3 years ago

Did you try user:password for the authentication param ?

i dont have user pass