A Python script to scrape V2Ray, VLESS, VMess, Trojan, and other proxy configuration links from Telegram channels using the Telethon library.
- Extracts V2Ray configs from predefined or searched Telegram channels.
- Supports multiple protocols (vless, vmess, trojan, ss, hy2, tuic, hysteria2).
- Logs activity and errors to
scraper.log. - Saves:
- all fetched messages to
all_channel_messages.txt - extracted configurations to
configs_to_test.txt
- all fetched messages to
git clone https://github.com/yourusername/V2rayScrapper.git
cd V2rayScrapperpip install telethon tqdm pyfiglet- Go to my.telegram.org
- Login and get your
api_idandapi_hash - Replace them in the script:
api_id = 123456 # ← your api_id
api_hash = "your_api_hash_here"python V2rayScrapper.pyYou'll be asked to choose:
- Normal mode → uses the predefined list of channels
- Search mode → searches Telegram for channels containing keywords
scraper.log→ logs of the scraping processall_channel_messages.txt→ all messages from channelsconfigs_to_test.txt→ unique extracted config links
- First-time run requires logging into Telegram (code sent via Telegram).
- Make sure you have permission to write in the folder.
- Tested on Python 3.8+
اسکریپتی پایتونی برای جمعآوری لینک کانفیگهای پروکسی (مثل V2Ray، VLESS، Trojan و ...) از کانالهای تلگرام با استفاده از کتابخانه Telethon.
- استخراج لینکهای کانفیگ از کانالهای مشخص یا جستجو شده.
- پشتیبانی از پروتکلهای vless, vmess, trojan, ss, hy2, tuic, hysteria2.
- لاگگیری از فرایند در
scraper.log. - ذخیره:
- همه پیامها در
all_channel_messages.txt - کانفیگها در
configs_to_test.txt
- همه پیامها در
git clone https://github.com/yourusername/V2rayScrapper.git
cd V2rayScrapper
pip install telethon tqdm pyfiglet- به آدرس my.telegram.org بروید.
- پس از ورود،
api_idوapi_hashخود را بگیرید. - سپس در فایل اسکریپت جایگزین کنید:
api_id = 123456
api_hash = "your_api_hash_here"python V2rayScrapper.pyوضعیت اجرا:
- حالت عادی → استفاده از لیست کانالهای پیشفرض
- حالت جستجو → جستجوی کانالهای جدید مرتبط با V2Ray
scraper.log→ گزارش اجرای برنامهall_channel_messages.txt→ پیامهای خواندهشده از کانالهاconfigs_to_test.txt→ کانفیگهای منحصربهفرد استخراجشده
- در اجرای اول نیاز به ورود و تأیید هویت تلگرام دارید.
- مطمئن شوید دسترسی نوشتن در مسیر پروژه دارید.
- با پایتون نسخه 3.8+ تست شده است.