A Go implementation of the Telegram configs collector that fetches proxy configurations from Telegram channels.
Note: This project is inspired by and builds upon the work of Sorush Mirzaei. I extend our gratitude for the original implementation and community contributions.
- 🚀 Fetches new messages from Telegram channels since last update
- 🔍 Extracts proxy configurations (Shadowsocks, Trojan, Vmess, Vless, Reality, Tuic, Hysteria, Juicity)
- 🧹 Removes duplicates automatically
- 💾 Saves all collected configs to a single file
- 📅 Tracks last update timestamp
- ⚡ High performance with goroutines support
- 🔗 Working Config Testing - Validates configurations by testing TCP connectivity to ensure ports are open
- Make sure you have Go installed (1.21+)
- Install dependencies:
go mod tidy- Make sure you have the required files:
telegram_channels.json- List of Telegram channels to monitorlast_update.txt- Will be created automatically on first run
Run the collector:
go run main.goOr build and run:
go build -o smgo main.go
./smgomain.go- Main collector scriptgo.mod- Go module definitiontelegram_channels.json- List of Telegram channels to scrapelast_update.txt- Timestamp of last successful runcollected_configs.txt- Output file with all collected configsir_configs.txt- Working Iranian proxy configurationsirb64.txt- Base64 encoded Iranian proxy configurations
Edit telegram_channels.json to add or remove channels you want to monitor.
All collected proxy configurations are saved to collected_configs.txt, one per line.
github.com/PuerkitoBio/goquery- HTML parsinggolang.org/x/net- HTTP utilities
- The script respects rate limits with 1-second delays between channel requests
- Only processes messages newer than the last update timestamp
- Automatically removes duplicate configurations
- Handles various proxy protocol formats
- Working Config Testing: Validates configurations by testing TCP connectivity with 1-second timeouts to ensure ports are accessible
Go version offers:
- ⚡ Faster execution than Node.js
- 🧵 Concurrent processing capabilities
- 💾 Lower memory usage
- 🔒 Type safety
ss://efacffac-6e04-450d-aeb3-397ce072ab0e@91.99.58.127:2090?security=reality&...
vless://fe837fd0-840d-4cee-9334-0dc6c2b15c1c@5.181.20.219:17422?security=reality&...
vmess://eyJhZGQiOiI5MS45OS4xODUuMjE2IiwiYWlkIjoiMCIs...