Use Firebase realtime database + Netlify cloud function to replace hits.seeyoufarm.com for usage statistics; Replace CF CDN domains.

This commit is contained in:
fscarmen
2025-04-03 07:45:56 +00:00
parent 974fe8736d
commit 5312718dde
2 changed files with 16 additions and 8 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 脚本更新日期 2025.03.18
# 脚本更新日期 2025.04.03
WORK_DIR=/sing-box
PORT=$START_PORT
SUBSCRIBE_TEMPLATE="https://raw.githubusercontent.com/fscarmen/client_template/main"
@@ -1255,6 +1255,9 @@ $(${WORK_DIR}/qrencode https://${ARGO_DOMAIN}/${UUID}/auto)
# 显示脚本使用情况数据
hint "\n*******************************************\n"
local STAT=$(wget -qO- --timeout=3 "https://stat-api.netlify.app/updateStats?script=sing-box-docker.sh")
[[ "$STAT" =~ \"todayCount\":([0-9]+),\"totalCount\":([0-9]+) ]] && local TODAY="${BASH_REMATCH[1]}" && local TOTAL="${BASH_REMATCH[2]}"
hint "\n 脚本当天运行次数: $TODAY,累计运行次数: $TOTAL \n"
}
# Sing-box 的最新版本