Skip to content

This project provides a Cloudflare Worker proxy for Telegraf, which can be used as an alternative endpoint to access the Telegram Bot API (https://api.telegram.org).

Notifications You must be signed in to change notification settings

anhtuank7c/telegram-proxy

Repository files navigation

Telegram Proxy

This project provides a Cloudflare Worker proxy for Telegraf, which can be used as an alternative endpoint to access the Telegram Bot API (https://api.telegram.org).

It allows users to deploy their own Cloudflare-based endpoint that forwards requests to Telegram’s servers.

This setup may be useful in cases where direct access is unstable or restricted due to networking conditions.

⚠️ Disclaimer

This project is a research and educational tool only. It is not intended to encourage or facilitate the bypassing of any network restrictions or government-imposed blocks.

Users are solely responsible for how they use this project. You must comply with all applicable laws and regulations in your country or region.

The author disclaims all liability for any misuse or legal consequences resulting from the use of this repository.

Development

Requirements:

  • Cloudflare account

Clone project

git clone [email protected]:anhtuank7c/telegram-proxy.git
cd telegram-proxy
pnpm install

Modify src/index.ts if you want to make some changes, otherwise just ignore it.

Before deploy, you can modify wrangler.jsonc name by your need

Deploy pnpm run deploy

Config your telegraf

const bot = new Telegraf(process.env.TELEGRAM_BOT_TOKEN!, {
  telegram: {
    apiRoot: 'https://your_worker_url.workers.dev/'
  }
})

About

This project provides a Cloudflare Worker proxy for Telegraf, which can be used as an alternative endpoint to access the Telegram Bot API (https://api.telegram.org).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published