Skip to content

facksten/V2rayScrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

V2rayScrapper

A Python script to scrape V2Ray, VLESS, VMess, Trojan, and other proxy configuration links from Telegram channels using the Telethon library.

✨ Features

  • 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

🚀 Setup

1. Clone the repository

git clone https://github.com/yourusername/V2rayScrapper.git
cd V2rayScrapper

2. Install dependencies

pip install telethon tqdm pyfiglet

3. Create a Telegram API App

  • Go to my.telegram.org
  • Login and get your api_id and api_hash
  • Replace them in the script:
api_id = 123456  # ← your api_id
api_hash = "your_api_hash_here"

4. Run the script

python V2rayScrapper.py

You'll be asked to choose:

  1. Normal mode → uses the predefined list of channels
  2. Search mode → searches Telegram for channels containing keywords

📂 Output Files

  • scraper.log → logs of the scraping process
  • all_channel_messages.txt → all messages from channels
  • configs_to_test.txt → unique extracted config links

📝 Notes

  • 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

اسکریپتی پایتونی برای جمع‌آوری لینک کانفیگ‌های پروکسی (مثل 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

۲. دریافت API از تلگرام

  • به آدرس my.telegram.org بروید.
  • پس از ورود، api_id و api_hash خود را بگیرید.
  • سپس در فایل اسکریپت جایگزین کنید:
api_id = 123456
api_hash = "your_api_hash_here"

۳. اجرای اسکریپت

python V2rayScrapper.py

وضعیت اجرا:

  1. حالت عادی → استفاده از لیست کانال‌های پیش‌فرض
  2. حالت جستجو → جستجوی کانال‌های جدید مرتبط با V2Ray

📂 خروجی‌ها

  • scraper.log → گزارش اجرای برنامه
  • all_channel_messages.txt → پیام‌های خوانده‌شده از کانال‌ها
  • configs_to_test.txt → کانفیگ‌های منحصربه‌فرد استخراج‌شده

📝 نکات

  • در اجرای اول نیاز به ورود و تأیید هویت تلگرام دارید.
  • مطمئن شوید دسترسی نوشتن در مسیر پروژه دارید.
  • با پایتون نسخه 3.8+ تست شده است.

About

Scrap V2ray from telegram channels and auto search for V2ray configs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages