跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[VPS] [TrafficCop 大更新] 支持 TG 推送!

发表于

项目地址: https://github.com/ypq123456789/TrafficCop 项目前贴: [ TrafficCop ] 监控 VPS 流量使用,到达限制自动限流,保留 SSH 端口可用

昨晚有坛友提了这个需求,我想想也是,这个需求应该大伙们都需要。所以,肝了昨天一个晚上加今天一天,调试出了这个功能。此中辛苦,不足为外人道也。不多说了,求点赞!求给项目点个 star !愿意赞助的可以看看项目 readme 最后。 目前我暂时使用没啥问题,大伙们多测试使用下。

Telegram Bot 集成

TrafficCop 现在集成了 Telegram Bot 功能,可以发送以下通知:

  • 限速警告
  • 限速解除通知
  • 新周期开始通知
  • 关机警告
  • 每日流量报告

要使用此功能,请在脚本配置过程中提供你的 Telegram Bot Token 和 Chat ID 。

Telegram Bot Token 在你创建机器人时会显示。

Chat ID 获取方法: https://api.telegram.org/bot${BOT_TOKEN}/getUpdates

${BOT_TOKEN}是你的 Telegram Bot Token

坛友提醒:chatid 还可以找 bot 获取, 更简单, 比如username_to_id_bot

相关命令

一键推送脚本

curl -H "Accept: application/vnd.github.v3.raw" -fsSL "https://api.github.com/repos/ypq123456789/TrafficCop/contents/tg_notifier.sh" | tr -d '\r' > /root/tg_notifier.sh && chmod +x /root/tg_notifier.sh && bash /root/tg_notifier.sh

查看 tg 推送定时执行日志

tail -f -n 30 /root/tg_notifier_cron.log

查看当前状态

tail -f -n 30 /tmp/last_traffic_notification

杀死所有 TG 推送进程

pkill -f tg_notifier.sh && crontab -l | grep -v "tg_notifier.sh" | crontab -

推送示意如下: image

Featured Replies

No posts to show

创建帐户或登录来提出意见

Account

导航

搜索

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.