Warpplus
Get WARP+ referral quota and notify users with Telegram Bot
Install / Use
/learn @Oreomeow/WarpplusREADME
WARP+ 推荐奖励 Telegram Bot

利用 Telegram Bot 获取 WARP+ 推荐奖励流量并通知用户
功能 (Functions)
- [x] 刷取一定次数
- [x] 不指定次数按 +∞ 刷取
- [x] 指定次数刷取
- [x] 刷取结果统计
- [x] 添加管理命令
- [x] 支持他人刷取
- [x] 查询当前流量
- [ ] 设置定时任务
- [ ] 支持多种语言
部署 (Deploy)
Warning 需要 Python >= 3.7
克隆仓库
git clone --depth=1 https://github.com/Oreomeow/warpplus && cd warpplus
安装依赖
pip3 install -r requirements.txt
配置参数
-
通过 @BotFather 获取 Bot API Token
-
通过 WARP APP 获取 ID
-
根据
config.example.json在同目录生成config.json配置文件{ "TOKEN": "# Telegram bot API Token (可在 @botfather 获取,如 10xxx4:AAFcqxxxxgER5uw)", "USER_ID": "# Telegram 用户 ID (给 @getidsbot 发送 /start 获取到的纯数字 ID,如 1434078534)", "GIFT_LIMIT": "# 限制其他用户单次刷取次数,如 10,不限制则输入 0", "REFERRER": "# WARP 应用 (如 1.1.1.1) 内的设备 ID", }
运行测试
python3 warpplus.py
Ctrl + C 退出
持久化运行
从以下方法中任选其一即可,或参考 Linux 守护进程的启动方法
-
Systemd (推荐)
一键脚本
bash install.sh查看
warpplus状态systemctl status warpplus查看
warpplus日志journalctl -u warpplus启动
warpplussystemctl start warpplus停止
warpplussystemctl stop warpplus重启
warpplussystemctl restart warpplus杀死
warpplus所有子进程systemctl kill warpplus -
nohup python3 warpplus.py > warpplus.log 2>&1 &查看日志
tail -f warpplus.log -
-
创建会话
screen -S warpplus python3 warpplus.py然后,按下
Ctrl + A和Ctrl + D,回到原来的会话 -
如果要查看日志,可以使用
screen -r warpplus;如果要停掉会话,按下Ctrl + C和Ctrl + D
-
-
-
安装
# Debian or Ubuntu apt install -y tmux # CentOS or RedHat yum install -y tmux -
新建会话
tmux new -s warpplus python3 warpplus.py -
分离会话
tmux detach或键盘按下
Ctrl + B D即可将当前会话与窗口分离 -
如果要查看日志,可以使用
tmux attach -t warpplus;如果要杀死会话tmux kill-session -t warpplus
-
/bind 命令说明
/bind <referrer> - 绑定 WARP 应用 (如 1.1.1.1) 内的设备 ID
/bind t <access_token> - 绑定 wgcf-account.toml 中的 access_token
/bind i <device_id> - 绑定 wgcf-account.toml 中的 device_id
/bind <access_token> <device_id> - 绑定成对
其中 <referrer> 和 <device_id> 其实是同一个,只是 <referrer> 可以在手机 APP 1.1.1.1 中找到,而从 wgcf-account.toml 提取的 <access_token> 和 <device_id> 必须绑定成对,否则无法进行流量查询
在安装了 wgcf 的机器上可以使用 Scripts/get.sh 进行快捷提取
也可以运行以下命令提取
if ! [ -f '/etc/wireguard/wgcf-account.toml' ]; then
echo "wgcf-account.toml 文件不存在,请查看是否已安装 wgcf。相关仓库 https://github.com/fscarmen/warp"
else
ACCESS_TOKEN=$(grep 'access_token' /etc/wireguard/wgcf-account.toml | cut -d \' -f2)
DEVICE_ID=$(grep 'device_id' /etc/wireguard/wgcf-account.toml | cut -d \' -f2)
echo "====================== 请复制以下内容 (不包括此行) ======================"
echo "${ACCESS_TOKEN} ${DEVICE_ID}"
echo "====================== 请复制以上内容 (不包括此行) ======================"
fi
命令 (Commands)
start - 开始使用
query - 查询流量
plus - (<n>) 💂♂️管理员账号添加流量,不输入次数视为 +∞
bind - [点击查看具体用法] 绑定账号
unbind - 解除绑定
gift - (<n>) 获取流量,不输入次数视为 +∞
stop - 💂♂️管理员停止运行中的任务
贡献 (Contributors)
鸣谢 (Thanks)
Related Skills
node-connect
338.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.6kCommit, push, and open a PR

