refactor: simplify auth and subscription links

This commit is contained in:
2026-07-28 10:32:21 +08:00
parent b7a7cd9c71
commit fc8c23beee
41 changed files with 739 additions and 1468 deletions
+9 -9
View File
@@ -36,24 +36,24 @@ curl -s -H "$H" "$BASE/api/sources" | python3 -c "import sys,json; d=json.load(s
echo ""
echo "=== 6. 下载本地源 — mihomo ==="
curl -s "$BASE/download/source/local-vless/mihomo?token=$DL" | head -30
curl -s "$BASE/sources/local-vless/$DL?target=mihomo" | head -30
echo ""
echo "=== 7. 下载本地源 — JSON ==="
curl -s "$BASE/download/source/local-vless/json?token=$DL" | python3 -c "import sys,json; d=json.load(sys.stdin); print(f'proxies={len(d.get(\"proxies\",[]))}'); [print(f' {p.get(\"name\")} ({p.get(\"type\")}) -> {p.get(\"server\")}:{p.get(\"port\")}') for p in d.get('proxies',[])]"
curl -s "$BASE/sources/local-vless/$DL?target=json" | python3 -c "import sys,json; d=json.load(sys.stdin); print(f'proxies={len(d.get(\"proxies\",[]))}'); [print(f' {p.get(\"name\")} ({p.get(\"type\")}) -> {p.get(\"server\")}:{p.get(\"port\")}') for p in d.get('proxies',[])]"
echo ""
echo "=== 8. 下载本地源 — sing-box ==="
curl -s "$BASE/download/source/local-vless/sing-box?token=$DL" | python3 -c "import sys,json; d=json.load(sys.stdin); print(f'outbounds={len(d.get(\"outbounds\",[]))}'); [print(f' {o.get(\"tag\",\"?\")} ({o.get(\"type\",\"?\")})') for o in d.get('outbounds',[])]"
curl -s "$BASE/sources/local-vless/$DL?target=sing-box" | python3 -c "import sys,json; d=json.load(sys.stdin); print(f'outbounds={len(d.get(\"outbounds\",[]))}'); [print(f' {o.get(\"tag\",\"?\")} ({o.get(\"type\",\"?\")})') for o in d.get('outbounds',[])]"
echo ""
echo "=== 9. 下载本地源 — URI ==="
curl -s "$BASE/download/source/local-vless/uri?token=$DL"
curl -s "$BASE/sources/local-vless/$DL?target=uri"
echo ""
echo ""
echo "=== 10. 下载本地源 — surge ==="
curl -s "$BASE/download/source/local-vless/surge?token=$DL" | head -10
curl -s "$BASE/sources/local-vless/$DL?target=surge" | head -10
echo ""
echo "=== 11. 创建集合 (local-vless + remote-sslinks) ==="
@@ -63,7 +63,7 @@ curl -s -X POST -H "$H" -H "$CT" \
echo ""
echo "=== 12. 下载集合 — mihomo ==="
curl -s "$BASE/download/collection/mixed-collection/mihomo?token=$DL" | head -40
curl -s "$BASE/collections/mixed-collection/$DL?target=mihomo" | head -40
echo ""
echo "=== 13. 远程源预览 — remote-sslinks ==="
@@ -73,15 +73,15 @@ curl -s -X POST -H "$H" -H "$CT" \
echo ""
echo "=== 14. 远程源下载 — remote-sslinks mihomo ==="
curl -s "$BASE/download/source/remote-sslinks/mihomo?token=$DL" 2>&1 | head -30
curl -s "$BASE/sources/remote-sslinks/$DL?target=mihomo" 2>&1 | head -30
echo ""
echo "=== 15. 远程源下载 — remote-smallstrawberry mihomo ==="
curl -s "$BASE/download/source/remote-smallstrawberry/mihomo?token=$DL" 2>&1 | head -30
curl -s "$BASE/sources/remote-smallstrawberry/$DL?target=mihomo" 2>&1 | head -30
echo ""
echo "=== 16. 远程源下载 — remote-aisaka mihomo ==="
curl -s "$BASE/download/source/remote-aisaka/mihomo?token=$DL" 2>&1 | head -30
curl -s "$BASE/sources/remote-aisaka/$DL?target=mihomo" 2>&1 | head -30
echo ""
echo "=== ALL TESTS DONE ==="