This script tests the validity and performance of MTProto proxies for Telegram. It reads proxy links from a file, checks their latency, and saves the valid ones to a separate file.
- Proxy Parsing: Extracts server, port, and secret from MTProto proxy links.
- Performance Testing: Measures the ping of each proxy.
- Validation: Only proxies with a ping time below 250ms are considered valid.
- Result Saving: Saves valid proxies to a specified output file.
- Python 3.x
requests
moduletelethon
module
- Clone the repository:
git clone https://github.com/m1chtv/mich-proxy-tester.git
cd mich-proxy-tester
- Install the required Python packages:
pip install requests telethon
- Replace
TELEGRAM_API_ID
andTELEGRAM_API_HASH
in the script with your own Telegram API credentials.
- Create a file named
mich.txt
in the project directory and add your proxy links (one per line) in the following format:
tg://proxy?server=yourserver&port=yourport&secret=yoursecret
- Run the script:
python mich.py
- If valid proxies are found, they will be saved to
proxy.txt
in the project directory.
Example of a proxy link format:
tg://proxy?server=example.com&port=443&secret=abcdef1234567890abcdef1234567890
Feel free to submit issues or pull requests for any improvements or features you'd like to see.