LOC 每日签到脚本,支持多账号、Telegram 推送, 开启 TLS 指纹伪装.
# 以 amd64 架构的系统为例
mkdir HostLoc_CheckIn
cd HostLoc_CheckIn
wget https://github.com/LordPenguin666/Hostloc-daily-checkin-tls/releases/download/v1.0.0/hostloc-check-in-linux-amd64.tar.gz
tar xvf hostloc-check-in-linux-amd64.tar.gzgit clone [email protected]:LordPenguin666/Hostloc-daily-checkin-tls.git
cd Hostloc-daily-checkin-tls
make default- 复制配置文件 example.json
cp example.json config.json; - 修改配置文件
vim config.json; - (可选) 你也可以通过
./hostloc -c /path/to/your/config指定配置文件路径; - 使用
./hostloc运行脚本。
可以使用 tmux 或 screen 等工具后台运行。
tmux new -s hostloc
./hostloc你也可以使用 systemd 等工具将其作为服务运行。
# /usr/lib/systemd/system/hostloc.service
[Unit]
Description=HostLoc CheckIn Service
After=network.target
Wants=network.target
[Service]
WorkingDirectory=/path/to/your/hostloc
ExecStart=/path/to/your/hostloc/hostloc
Restart=on-abnormal
RestartSec=5s
KillMode=mixed
[Install]
WantedBy=multi-user.target- 可以设置启动程序时立即开始签到
- 可以通过配置文件指定多个帐号,也可以配置 Telegram 推送
{
"time": "0 5 * * *" // 每天 5 点执行
}{
"startup": true
}{
"accounts": [
{"username": "第一个帐号名", "password": "密码"},
{"username": "第二个帐号名", "password": "密码"},
{"username": "cuper", "password": "114514"}
]
}{
"telegram": {
"enable": true, // 开启推送
"token": "abcd12345", //这里填写 bot token
"chat_id": 114514 // 这里填写对话 id
}
}