A lightweight PHP script that acts as a proxy layer between your client application and the official Telegram Bot API.
It receives incoming requests, processes them, and forwards them to the Telegram servers β useful for adding custom logging, security layers, or bypassing access restrictions.
- Proxy functionality for Telegram Bot API requests
- Easy to deploy on any server with PHP & Apache
- Supports clean URLs via
.htaccessrewrite rules - BSD-3-Clause licensed for flexible use
βββ index.php # Core proxy script βββ .htaccess # URL rewrite and security headers βββ LICENSE # BSD-3-Clause license βββ README.md # Project documentation
- PHP 7.4+
- Apache with
mod_rewriteenabled
Clone the repository into your web server's root:
git clone https://github.com/walid-khalafi/TelegramRobotsProxy.git
cd TelegramRobotsProxy
### 3. Configuration
Edit config.php (create if not present) to set:
- Your Telegram Bot Token
- Telegram API endpoint
- Optional: IP whitelist or API Key
### 4. Deployment
Upload the project to your hosting environment and ensure .htaccess is active.
# π‘ Security Recommendations
- Restrict access by IP or authentication
- Enable HTTPS on your server
- Log requests and mask sensitive data
#π‘ Contributing
Contributions are welcome! Fork the repository, make your changes in a feature branch, and submit a Pull Request.