/ProxyFixerBot

A simple bot to fix proxy links.

Primary LanguageGoMIT LicenseMIT

ProxyFixerBot

A simple bot to fix proxy links.

The Problem

Ever clicked on a Telegram proxy link only to have it fail in clients like Telegram Desktop? Many proxies use non-standard or padded secret keys (often encoded in Base64). While some clients can handle this, stricter clients require a clean, 32-character hexadecimal secret.

This bot was born out of the need to instantly convert these problematic links into a universally compatible format that works on every client.

How It Works

ProxyFixerBot acts as a translator. When you send it a proxy link, it:

  1. Parses the URL to extract the secret.

  2. Decodes the secret, whether it's Base64 or already Hex.

  3. Applies the official Telegram Desktop logic, ported from its C++ source code. This includes correctly handling special secret formats (like the dd and ee prefixes).

  4. Strips all junk and padding, isolating the true 16-byte secret key.

  5. Re-encodes the clean secret into the standard 32-character hex format.

  6. Rebuilds the URL and sends the fixed, ready-to-use proxy link back to you.

The result is a perfectly formatted proxy link that connects without issues.

Getting Started

You can have your own instance of ProxyFixerBot running in minutes.

Prerequisites

  • Go: Make sure you have Go installed (version 1.23 or newer).
  • A Telegram Bot Token: Get one from @BotFather on Telegram.

Installation

  1. Clone the repository
git clone https://github.com/ALiwoto/ProxyFixerBot.git
  1. Configure the bot
cp config.sample.json config.json
  1. edit the config.json file and fill in the variables there.

  2. Run the bot

go run main.go

Using the bot

You can use the bot as simple as it gets:

  1. Find your bot on Telegram (or use the already hosted one).
  2. Send it any t.me/proxy?... or tg://proxy?... links (multiple links at once are supported)
  3. The bot will instantly reply with the fixed version of the link. Click it, connect and enjoy.

Contributing

Contributions are welcome! If you have ideas for improvements, new features, or have found a bug, please feel free to:

  • Open an issue to discuss your idea.
  • Fork the repository and submit a pull request.

Special Thanks

This project was made possible because of

  • Members of Telegram Desktop chat.
  • Vimicito (from TDesktop chat).
  • Яico X (creating a bot for this was his idea).
  • Preston and his clear C++ code here.