tdlight-team / tdlight-telegram-bot-api

The TDLight Telegram Bot API is an actively enhanced fork of the original Bot API, featuring experimental user support, proxies, unlimited files size, and more.
https://t.me/TDLight
Boost Software License 1.0
124 stars 27 forks source link

Running tdlight-telegram-bot-api via corporate HTTP proxy #80

Closed ipetrovmgn closed 1 year ago

ipetrovmgn commented 1 year ago

Is it possible to run tdlight-telegram-bot-api via corporate proxy?

Unfortunately original telegram-bot-api needs to modify source code in Client.cpp to work via proxy. You have methods proxyTypeHttp proxyTypeMtproto proxyTypeSocks5 but how use them? Docker-entrypoint show TELEGRAM_PROXY option but it related to webhooks, In the same time tdlight-api-openapi.yaml have options /addProxy via POST. Kindly please advice what should be done? Thanks!

giuseppeM99 commented 1 year ago

You need to add a proxy first using the addProxy method, you'll get a proxy_id, use that id with the enableProxy method to use it Note that proxies are per bot and not for the whole botapi