TUS — Telegram Username Sniper
🇷🇺 Молниеносный снайпер Telegram-юзернеймов на Go. Автоматически мониторит и забирает юзернеймы, как только они становятся доступны.
🇬🇧 Lightning-fast Telegram username sniper in Go. Automatically monitors and claims usernames the moment they become available.
Обновлённая версия / Updated version: Go 1.25 + github.com/gotd/td v0.161.0 (последний MTProto-слой Telegram / latest Telegram MTProto layer).
# Linux/macOS — скачает бинарь под твою платформу, проверит SHA256, настроит конфиг:
curl -fsSL https://raw.githubusercontent.com/ixode0/TUS/main/install.sh | bash
# с параметрами (без вопросов):
curl -fsSL https://raw.githubusercontent.com/ixode0/TUS/main/install.sh | bash -s -- \
--api-id 12345 --api-hash abcdef... --phone +1234567890 --usernames user1,user2
tus # запуск (первый раз попросит код из Telegram)Windows (PowerShell):
irm https://raw.githubusercontent.com/ixode0/TUS/main/install.ps1 | iexcurl -fsSL https://raw.githubusercontent.com/ixode0/TUS/main/install.sh | bash -s -- \
--api-id 12345 --api-hash abcdef... --phone +1234567890 --usernames user1,user2
tusРучная установка из исходников / Manual build: см. Running.
🇷🇺
install.shкачает бинарь из GitHub Releases (ассетыsniper-linux/darwin-amd64/arm64, для Windows —sniper-windows-amd64.exeчерезinstall.ps1, плюсSHA256SUMS.txt; собирает.github/workflows/release.ymlпо тегуv*). После push проверь: Actions → CI зелёный → (для релиза: поставь тегvX.Y.Z) → Releases → скачай бинарь. 🇬🇧install.shfetches the binary from GitHub Releases (assetssniper-linux/darwin-amd64/arm64, for Windows —sniper-windows-amd64.exeviainstall.ps1, plusSHA256SUMS.txt; built by.github/workflows/release.ymlon tagv*). After pushing, verify: Actions → CI green → (for a release: tagvX.Y.Z) → Releases → download the binary.
Забудьте про ручную правку config.json. Если вы пользуетесь ИИ-помощником — скопируйте этот промт, и он настроит всё сам:
Вот репозиторий снайпера Telegram-юзернеймов: TUS (Go) — https://github.com/ixode0/TUS.git
1. Проще всего — установщик выше (`install.sh` ставит готовый бинарь). Вручную: git clone https://github.com/ixode0/TUS.git && cd TUS, затем выполни go mod tidy и собери: go build -o sniper ./cmd/app (Go 1.25+, модуль github.com/ixode0/TUS).
2. Запроси у пользователя по очереди:
- API ID и API Hash (он их получит на https://my.telegram.org → API development tools)
- номер телефона в международном формате (+..., с плюсом — валидация строгая)
- список юзернеймов для мониторинга (массив usernames, без @)
- способ клейма: channel (создать публичный канал с title = username и затем установить юзернейм) или user (account.updateUsername на аккаунт)
- паузу между проверками в мс (sleep_between_check, рекомендуется 100, <50 — уже риск FloodWait)
3. Заполни config.json этими данными (лежит в корне репо; можно переопределить путь через env CONFIG_PATH).
4. Запусти ./sniper рядом с config.json.
5. При первом запуске программа запросит код авторизации — попроси его у пользователя и передай программе через stdin. Для автоматики: можно заранее задать env TG_CODE или положить код в файл /tmp/tg_code.txt (файл удалится после чтения). Если у аккаунта включена 2FA — следующим шагом запросит пароль (Enter your password:).
6. Сессия сохранится в session_DO_NOT_SHARE.json рядом с бинарём (FileStorage) — добавь его в .gitignore и никому не показывай.
7. Если снайпер не смог забрать юзернейм сразу — он будет ретраить каждые 1.5с бесконечно (отдельная горутина на каждый юзернейм), с корректной обработкой FloodWait (ждёт указанное время) и остановкой при USERNAME_OCCUPIED / USERNAME_NOT_AVAILABLE. Отчитайся пользователю, когда юзернейм будет успешно захвачен (лог [Successfully claimed: ...]).
Этот промт особенно удобен, если у пользователя нет окружения Go — ИИ сделает сборку и запуск за него.
Forget manual config.json editing. If you use an AI assistant — copy this prompt and it will set everything up:
Here's the Telegram username sniper repository: TUS (Go) — https://github.com/ixode0/TUS.git
1. Easiest — the installer above (`install.sh` fetches a ready binary). Manually: git clone https://github.com/ixode0/TUS.git && cd TUS, then run go mod tidy and build: go build -o sniper ./cmd/app (Go 1.25+, module github.com/ixode0/TUS).
2. Ask the user step-by-step for:
- API ID and API Hash (from https://my.telegram.org → API development tools)
- phone number in international format (+..., with plus — strict validation)
- list of usernames to monitor (usernames array, without @)
- claim method: channel (create public channel with title = username then set username) or user (account.updateUsername on the account)
- delay between checks in ms (sleep_between_check, recommended 100, <50 risks FloodWait)
3. Fill config.json with this data (located at repo root; path can be overridden via env CONFIG_PATH).
4. Run ./sniper next to config.json.
5. On first launch the app will request an auth code — ask the user for it and pass it via stdin. For automation: pre-set env TG_CODE or put the code into /tmp/tg_code.txt (file is deleted after reading). If the account has 2FA enabled — next it will ask for password (Enter your password:).
6. Session will be saved to session_DO_NOT_SHARE.json next to the binary (FileStorage) — add it to .gitignore and never share it.
7. If the sniper fails to claim immediately — it will retry every 1.5s forever (separate goroutine per username), with proper FloodWait handling (waits the required duration) and stopping on USERNAME_OCCUPIED / USERNAME_NOT_AVAILABLE. Notify the user when the username is successfully claimed (log [Successfully claimed: ...]).
This prompt is especially handy if the user has no Go environment — the AI will handle build and run.
- Сервис проверяет доступность юзернейма через fragment.com.
- Как только юзернейм становится
Available, снайпер через Telegram API либо создаёт новый канал, либо назначает юзернейм на аккаунт — зависит от настроек. - При неудаче повторяет попытку каждые 1.5 секунды до успеха (с учётом
FloodWait).
- The service checks username availability via fragment.com.
- As soon as the username becomes
Available, the sniper via Telegram API either creates a new channel or assigns the username to the account — depending on settings. - On failure it retries every 1.5 seconds until success (respecting
FloodWait).
- Гибкий способ клейма:
channel(канал) илиuser(аккаунт) - Несколько юзернеймов в списке
- Авто-удаление уже занятых юзернеймов из мониторинга
- Бесконечный ретрай каждые 1.5с + учёт
FloodWait - Интерактивная авторизация Telegram
- Постоянная сессия (
session_DO_NOT_SHARE.json) - Публичный канал создаётся автоматически с
title = username - Прокси
- Несколько аккаунтов
- Flexible claim method:
channeloruser - Multiple usernames in watchlist
- Auto-removal of already taken usernames from monitoring
- Infinite retry every 1.5s +
FloodWaithandling - Interactive Telegram authorization
- Persistent session (
session_DO_NOT_SHARE.json) - Public channel is created automatically with
title = username - Proxy
- Multiple accounts
Q: Можно ли снайпить юзернеймы на аукционе fragment? A: Нет. Юзернеймы на аукционе автосвопятся и никогда не становятся доступны для клейма.
Q: Можно ли использовать bot token?
A: Нет. Боты не имеют доступа к channels.createChannel и account.updateUsername, которые требуются снайперу. Нужен обычный аккаунт (user).
Q: Почему лучше клеймить в канал?
A: У каналов меньше рейт-лимитов, а юзернейм канала всё равно можно продать на fragment. Настраивается через claim_to.
Q: Сколько юзернеймов мониторить? A: Не рекомендуется больше 5 за раз — при большом количестве есть шанс пропустить момент освобождения. Лучше меньше юзов + терпение.
Q: Как находить юзернеймы под снайпинг? A:
- Онлайн-площадки продажи Telegram-юзернеймов.
- Неактивные аккаунты («last seen a long time ago») — такие могут быть удалены в ближайшие 1-12 месяцев.
Q: Can I snipe usernames that are on fragment auction? A: No. Auction usernames are auto-swapped and never become available to claim.
Q: Can I use a bot token?
A: No. Bots don't have access to channels.createChannel and account.updateUsername required by the sniper. You need a regular user account.
Q: Why is claiming to a channel better?
A: Channels have fewer rate limits, and a channel username can still be sold on fragment. Configured via claim_to.
Q: How many usernames should I monitor? A: Not recommended more than 5 at once — with many usernames you may miss the release moment. Fewer targets + patience is better.
Q: How to find usernames to snipe? A:
- Online Telegram username marketplaces.
- Inactive accounts ("last seen a long time ago") — such accounts may be deleted in the next 1-12 months.
Q: Пустой ответ fragment — это Available? / Is an empty fragment response Available?
A: 🇷🇺 Нет — пустой h = Unknown (не Available), клейм не запускается, мониторинг продолжает ждать. 🇬🇧 No — empty h = Unknown, no claim is started.
Q: Как использовать прокси? / How to use a proxy?
A: 🇷🇺 Отдельного поля нет — fragment идёт через env: export HTTPS_PROXY=http://127.0.0.1:8080 или export HTTPS_PROXY=socks5://127.0.0.1:1080 (поддержаны HTTP_PROXY/HTTPS_PROXY, в т.ч. socks5://). 🇬🇧 No dedicated field — set HTTPS_PROXY/HTTP_PROXY env (incl. socks5://), e.g. HTTPS_PROXY=socks5://127.0.0.1:1080 ./sniper.
Q: Сколько потоков проверки? / How many check threads?
A: 🇷🇺 Монитор проверяет до 5 юзернеймов параллельно, пауза одна на раунд (sleep_between_check). 🇬🇧 Monitor checks up to 5 usernames in parallel, one sleep per round.
Q: Где канонический путь репозитория? / What is the canonical path? A: 🇷🇺 Каноника — https://github.com/ixode0/TUS. 🇬🇧 Canonical — https://github.com/ixode0/TUS.
Скопируйте config.example.json в config.json и заполните (config.json в .gitignore — секреты никогда не коммитятся):
{
"telegram": {
"phone_number": "+1234567890",
"api_id": 12345,
"api_hash": "abcdef1234567890"
},
"claim_to": "channel",
"sleep_between_check": 100,
"usernames": [
"your_username"
]
}| Поле | Описание |
|---|---|
telegram.phone_number |
Номер аккаунта в международном формате (+1234567890) |
telegram.api_id / telegram.api_hash |
Получить на https://my.telegram.org → API development tools |
claim_to |
Способ клейма: channel или user (регистр не важен, Channel → channel). user — деструктивно: заменяет юзернейм аккаунта, перед клеймом спросит YES |
sleep_between_check |
Пауза между проверками, мс. Дефолт 100 (пусто/0 → 100). Менее 50 может вызвать рейт-лимиты (FloodWait) |
usernames |
Список юзернеймов для мониторинга без @ (например ["dead", "devious"]; @dead тоже примут — @ срежется, регистр → нижний) |
CLAIM_MAX_ATTEMPTS (env) |
Лимит попыток клейма на юзернейм. Дефолт 0 = бесконечно (остановка только по успеху/постоянной ошибке/выходу). Пример: CLAIM_MAX_ATTEMPTS=200 ./sniper |
Copy config.example.json to config.json and fill it (config.json is git-ignored — secrets are never committed):
{
"telegram": {
"phone_number": "+1234567890",
"api_id": 12345,
"api_hash": "abcdef1234567890"
},
"claim_to": "channel",
"sleep_between_check": 100,
"usernames": [
"your_username"
]
}| Field | Description |
|---|---|
telegram.phone_number |
Account phone in international format (+1234567890; spaces/dashes are stripped, leading 8 → use +7 instead) |
telegram.api_id / telegram.api_hash |
Get at https://my.telegram.org → API development tools |
claim_to |
Claim method: channel or user (case-insensitive). user is destructive: replaces the account username, asks for YES first |
sleep_between_check |
Delay between checks, ms. Default 100 (missing/0 → 100). Below 50 may trigger rate limits |
usernames |
List of usernames to watch without @ (e.g. ["dead", "devious"]; leading @ is stripped, lowercased) |
CLAIM_MAX_ATTEMPTS (env) |
Max claim attempts per username. Default 0 = unlimited (stops only on success/permanent error/shutdown). E.g. CLAIM_MAX_ATTEMPTS=200 ./sniper |
# Требуется Go 1.25+
cp config.example.json config.json # затем заполните api_id/api_hash/phone/usernames
go mod tidy
go run ./cmd/app # из корня репоИли собрать бинарь и запустить рядом с config.json:
go build -o sniper ./cmd/app
./sniperПри первом запуске будет запрошен код авторизации из Telegram — он придёт в чат приложения (не СМС, ввод скрыт: вставь и Enter). Если включена 2FA — далее запросит пароль 2FA (ввод тоже скрыт). После этого сессия сохранится в session_DO_NOT_SHARE.json (не делитесь и не коммитьте этот файл).
Не-интерактивный запуск: код можно подложить в
TG_CODE(env) или файл/tmp/tg_code.txt(удалится после чтения). Пароль 2FA при необходимости — через stdin (скрытый ввод).
# Requires Go 1.25+
cp config.example.json config.json # then fill api_id/api_hash/phone/usernames
go mod tidy
go run ./cmd/app # from repo rootOr build the binary and run next to config.json:
go build -o sniper ./cmd/app
./sniperOn first launch you'll be asked for the Telegram auth code — it arrives in the app chat (not SMS, hidden input: paste + Enter). If 2FA is enabled — it will then ask for the 2FA password (also hidden). Afterwards the session is saved to session_DO_NOT_SHARE.json (do not share or commit this file).
Non-interactive run: you can provide the code via
TG_CODEenv or/tmp/tg_code.txtfile (deleted after reading). 2FA password if needed — via stdin (hidden input).
Частично походит из оригинального проекта: qg5/telegram-username-sniper (MIT).
Partially based on the original project: qg5/telegram-username-sniper (MIT).
Лицензия / License: MIT