{"id":20048448,"url":"https://github.com/aggstam/telegram-bot-proxy","last_synced_at":"2026-06-05T01:31:01.642Z","repository":{"id":238539869,"uuid":"796777725","full_name":"aggstam/telegram-bot-proxy","owner":"aggstam","description":"Self hosting proxy for sending prompts and grabing responses from telegram bots.","archived":false,"fork":false,"pushed_at":"2025-11-30T13:26:11.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-02T19:48:24.134Z","etag":null,"topics":["telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aggstam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-06T15:57:28.000Z","updated_at":"2025-11-30T13:26:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"d979a397-999d-4622-acd7-a8f03f6d0b02","html_url":"https://github.com/aggstam/telegram-bot-proxy","commit_stats":null,"previous_names":["aggstam/telegram-bot-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aggstam/telegram-bot-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Ftelegram-bot-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Ftelegram-bot-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Ftelegram-bot-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Ftelegram-bot-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aggstam","download_url":"https://codeload.github.com/aggstam/telegram-bot-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Ftelegram-bot-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33927313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["telegram-bot"],"created_at":"2024-11-13T11:44:08.209Z","updated_at":"2026-06-05T01:31:01.636Z","avatar_url":"https://github.com/aggstam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram-bot-proxy\n`Telegram` bots become better and better by the day, providing extremely useful information thats handy to have accessible\nby just a simple command prompt. BUT most(if not all) of them are closed source, hosted in a centralized service,\nconstantly sniffing all your group messages until a prompt arrives. How can you be sure that the bot reads just the\nmessages its supposed to and nothing more? This is a great opsec vulnerability, and unless bots providers open source\ntheir code and provide self hosting capabilities, you should *never* use such services.\n\nAlas anon, there is a solution, more like a ducktaping, to this issue. This repo provides a self hosting\nproxy, which you can configure to retrieve specific prompt messages and forward them to a fully restricted group,\nwhich will contain the sus bot, similar to how you would firejail a program to not access parts of your system\nwhile its running. That way you can rest assure, the bot only reads command prompt messages and nothing else,\ngiving you the juicy alpha you so desire.\n\nSince telegram bots can't read each others messages, you are required to create an API ID and HASH for your(or a random)\naccount, to use with this setup, following the official docs: https://core.telegram.org/api/obtaining_api_id#obtaining-api-id\nTo setup the proxy, you also need to create a new group, that will contain the sus bots, and grab both that group and your\nmain group IDs, to use in the configuration. Your user must exist in both groups so your proxy can \"forward\" the messages\nbettween them. The proxy only forwards messages using the prompt prefix `/p`.\n\nAfter you obtained your key, you can configure the proxy by simply editting the Makefile with your config options:\n| Config         | Description                                                            |\n|----------------|------------------------------------------------------------------------|\n| `API_ID`       | Your API key, provided by `telegram`                                   |\n| `API_HASH`     | Your API hash, provided by `telegram`                                  |\n| `PHONE`        | Your `telegram` account phone number                                   |\n| `DB_PASS`      | Password used to encrypt the account information                       |\n| `GROUP_ID`     | The `tg` group you want to protect from sniffers                       |\n| `BOTS_GROUP_ID`| The `tg` group you want to dump all the trash bots and protect against |\n\n## Usage\nScript provides the following Make targets:\n| Target      | Description                             |\n|-------------|-----------------------------------------|\n| `bootstrap` | Create the environment and get all deps |\n| `clean`     | Remove build artifacts                  |\n| `deploy`    | Start the proxy using the configuration |\n\n### Environment setup\nThe following OS dependencies are required:\n|   Dependency   |\n|----------------|\n| git            |\n| make           |\n| python         |\n| python-venv    |\n| libssl1.1      |\n\nBefore first usage, you have to grab all the required python libraries:\n```shell\n$ make bootstrap\n```\n### Execution\nSince we are using a `python` virtual environment, we have to source\nit before starting the proxy:\n```shell\n$ . {FULL_PATH_REPO}/venv/bin/activate\n```\nAfter that, you can modify the configuration and start the proxy:\n```shell\n$ make deploy\n```\nAfter the proxy is up and running, you can verify it's working by\nsending a prompt using the `/p` prefix, like `/p /c btc`.\nYou should see your account posting the message `/c btc` in the bots jail group\nand after the bot respond the message should be forwarded back to your main group.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faggstam%2Ftelegram-bot-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faggstam%2Ftelegram-bot-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faggstam%2Ftelegram-bot-proxy/lists"}