telegram-bot-ruby icon indicating copy to clipboard operation
telegram-bot-ruby copied to clipboard

use proxy feature

Open lenferer opened this issue 7 years ago • 6 comments

In connection with the blocking of Telegram in Russia, the possibility of using a proxy is very important. It solve how to substitute the https://api.telegram.org end-point with proxy? #63 issue

lenferer avatar Apr 18 '18 14:04 lenferer

Great, but monkey-patching Faraday::Adapter::NetHttp is a really bad idea. WDYT about subclass or some another way?

vladislav-yashin avatar May 07 '18 12:05 vladislav-yashin

It is still relevant? Telegram seems to work fine despite of any blocks, doesn't it?

ivanovaleksey avatar May 07 '18 12:05 ivanovaleksey

Some Internet providers still work intermittently

lenferer avatar May 07 '18 12:05 lenferer

Anyway i'm not really happy about such workarounds in the gem. Why not to implement your own Faraday adapter? You always can pass it as an argument.

atipugin avatar May 07 '18 12:05 atipugin

We can only transfer the adapter type but not the instance, unfortunately.

lenferer avatar May 08 '18 11:05 lenferer

@lenferer why do you need an instance? Instances of adapters are being instantiated internally in Faraday. You just need to register your adapter as a middleware (see).

vladislav-yashin avatar May 08 '18 13:05 vladislav-yashin

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Feb 19 '23 15:02 github-actions[bot]