- Python 98.5%
- Batchfile 0.7%
- Shell 0.8%
|
|
||
|---|---|---|
| src | ||
| .env.example | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE.md | ||
| MIGRATION.md | ||
| README.md | ||
| requirements.txt | ||
| run.bat | ||
| run.sh | ||
| SECURITY.md | ||
HoyoSignIn
Daily automatic check-in tool for HoYoverse games with Telegram notifications.
Contents
- About
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Security
- What's New in Version 2.0
- Contributing
- License
About
This is an enhanced version of the tool for automatic daily check-ins in HoYoverse games (Genshin Impact, Honkai: Star Rail, Honkai Impact 3rd, Tears of Themis, Zenless Zone Zero) with notifications via Telegram.
The project is intended for self-hosting on your PC or Cloud/VPS.
Supports Windows and Linux.
Features
- ✅ Support for all HoYoverse games (Genshin, HSR, HI3, ToT, ZZZ)
- ✅ Multiple account support
- ✅ Individual Telegram notifications for each account
- ✅ Secure secret storage with validation
- ✅ Modern Telegram notifications with HTML formatting
- ✅ Per-channel SOCKS5 proxy — independently route sign-in and Telegram traffic
- ✅ Professional code architecture with type hints
- ✅ Backward compatibility with old configurations
Prerequisites
- Python 3.10 or higher
- Git (for cloning the repository)
Installation
- Clone the repository:
git clone https://github.com/TFBosoN/HoyoSighIn
cd HoyoSighIn
- Install dependencies:
pip install -r requirements.txt
Configuration
1. Create .env file
Copy the configuration example (if .env.example exists) or create a new .env file in the project root.
2. Configure Telegram bot (optional, but recommended)
- Create a bot via @BotFather in Telegram
- Get the bot token
- Get your Chat ID:
- Send a message to @userinfobot or @RawDataBot
- Copy your
idfrom the response
Add to .env:
BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
3. Configure accounts
New Format (Recommended) - with individual notifications
For each account, add:
# Account 1
ACCOUNT_12345_COOKIES=account_id=12345;cookie_token=xxx;ltoken=xxx;ltuid=12345;mi18nLang=ru-ru;_MHYUUID=xxx
ACCOUNT_12345_TELEGRAM_CHAT_ID=987654321
ACCOUNT_12345_ENABLED_GAMES=Genshin,HSR,HI3
# Account 2
ACCOUNT_67890_COOKIES=account_id=67890;cookie_token=yyy;ltoken_v2=yyy;ltuid_v2=67890;mi18nLang=en-us;_MHYUUID=yyy
ACCOUNT_67890_TELEGRAM_CHAT_ID=123456789
ACCOUNT_67890_ENABLED_GAMES=HSR,ZZZ
Parameters:
ACCOUNT_<ID>_COOKIES- required field, cookie stringACCOUNT_<ID>_TELEGRAM_CHAT_ID- optional, Chat ID for individual notifications (if not specified,TELEGRAM_CHAT_IDis used)ACCOUNT_<ID>_ENABLED_GAMES- optional, comma-separated list of games (default: all games)
Old Format (for backward compatibility)
You can use the old format for quick migration:
OS_COOKIE_Genshin=cookie1@cookie2@cookie3
OS_COOKIE_HSR=cookie1@cookie2
4. How to get cookies
- Open browser and go to https://act.hoyolab.com
- Log in to your account
- Navigate to the daily rewards page for the desired game
- Open developer tools (F12)
- Go to Application tab (Chrome) or Storage tab (Firefox)
- Find Cookies →
https://act.hoyolab.com - Copy values from the following fields:
account_idcookie_tokenltokenorltoken_v2ltuidorltuid_v2mi18nLang_MHYUUID
- Assemble the string in the format:
account_id=xxx;cookie_token=xxx;ltoken=xxx;ltuid=xxx;mi18nLang=ru-ru;_MHYUUID=xxx
Detailed guide: https://am-steph.github.io/wayscript-login-helper/
5. Additional settings (optional)
# User Agent (default is used if not specified)
USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0
Proxy (optional)
The proxy must be a SOCKS5 address. You can route sign-in API calls and Telegram notifications independently through the same proxy:
# SOCKS5 address — shared by both channels
PROXY_DATA=username:password@127.0.0.1:1080
# Enable proxy for game sign-in API calls
USE_PROXY_SIGNIN=true
# Enable proxy for Telegram notification calls
USE_PROXY_TELEGRAM=false
Set both to true if you want all traffic through the proxy. If you just want the old single-flag behaviour, USE_PROXY=true still works as a shortcut that enables the proxy for both channels.
Usage
Windows
Manual execution
Run run.bat or execute manually:
cd src
python -m __init__
Automatic execution via Task Scheduler
- Open Task Scheduler
- Create a Basic Task
- Give it a name (e.g., "HoyoSignIn Daily")
- Select trigger Daily
- Choose start time (servers reset at 16:00 UTC)
- Select action Start a program
- In "Program or script" field, specify:
C:\<Path>\<to>\<project>\run.bat - In "Start in" field, specify:
C:\<Path>\<to>\<project> - Click Finish
Linux
Manual execution
Run run.sh or execute manually:
cd src
python3 -m __init__
Automatic execution via cron
- Make
run.shexecutable:
chmod +x run.sh
- Open crontab editor:
crontab -e
- Add entry (example to run every day at 3:00 AM):
0 3 * * * /path/to/HoyoSignIn/run.sh
Security
⚠️ IMPORTANT:
- NEVER commit
.envfile to git! - Keep cookies secure
- Do not share your cookies with others
- Regularly update cookies (they may expire)
The .env file is already added to .gitignore to protect your data.
What's New in Version 2.0
- 🔒 Secure secret storage with Pydantic validation
- 👤 Individual notifications for each account in Telegram
- 📱 Enhanced Telegram notifications with HTML formatting
- 🌐 Per-channel SOCKS5 proxy —
USE_PROXY_SIGNINandUSE_PROXY_TELEGRAMlet you route game API calls and Telegram traffic independently - 🏗️ Professional architecture with type hints and modular structure
- 📦 Updated dependencies to latest versions
- ♻️ Backward compatibility with old configurations (
USE_PROXYstill works)
Contributing
We welcome contributions to the project! Please:
- Fork the project
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under GNU GPLv3.