diff --git a/apps/sub-store/README.md b/apps/sub-store/README.md new file mode 100644 index 00000000..75323881 --- /dev/null +++ b/apps/sub-store/README.md @@ -0,0 +1,61 @@ +
+
+Sub-Store +
+
+

Sub-Store

+

+ +

+Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket. +

+ +[![Build](https://github.com/sub-store-org/Sub-Store/actions/workflows/main.yml/badge.svg)](https://github.com/sub-store-org/Sub-Store/actions/workflows/main.yml) ![GitHub](https://img.shields.io/github/license/sub-store-org/Sub-Store) ![GitHub issues](https://img.shields.io/github/issues/sub-store-org/Sub-Store) ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/Peng-Ym/Sub-Store) ![Lines of code](https://img.shields.io/tokei/lines/github/sub-store-org/Sub-Store) ![Size](https://img.shields.io/github/languages/code-size/sub-store-org/Sub-Store) +sub-store-org%2FSub-Store | Trendshift +[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/PengYM) + +Core functionalities: + +1. Conversion among various formats. +2. Subscription formatting. +3. Collect multiple subscriptions in one URL. + + +*** +## 镜像地址 + +- https://hub.docker.com/r/xream/sub-store + +## 使用示例 + +### 一键配置打开 本地前端+本地后端 + +[`http://127.0.0.1:3001?api=http://127.0.0.1:3001/2cXaAxRGfddmGz2yx1wA`](http://127.0.0.1:3001/?api=http://127.0.0.1:3001/2cXaAxRGfddmGz2yx1wA) + +意思是 后端地址为 `http://127.0.0.1:3001/2cXaAxRGfddmGz2yx1wA` + +简单验证一下 `http://127.0.0.1:3001/2cXaAxRGfddmGz2yx1wA/api/utils/env` 可以看到版本信息 + +同样此 URL 也可以作为健康检查的 URL + +## 启动 + +数据文件夹: `/root/sub-store-data` + +端口: `3001` + +监听: `127.0.0.1` // 本示例中演示的是本地版, 局域网直接访问等场景请自己设置 + +后端前缀: `/2cXaAxRGfddmGz2yx1wA` + +定时任务: `55 23 * * *` 每天 23 点 55 分(避开部分机场后端每天0点定时重启) + +> 本示例中演示的定时任务环境变量为 `SUB_STORE_CRON`, 此时使用的是系统的 `crond`; 如果有问题, 可以使用 `SUB_STORE_BACKEND_CRON`, 此时将使用 Node 版 `node-cron` + +推送服务: `https://api.day.app/XXXXXXXXXXXX/[推送标题]/[推送内容]?group=SubStore&autoCopy=1&isArchive=1&sound=shake&level=timeSensitive&icon=https%3A%2F%2Fraw.githubusercontent.com%2F58xinian%2Ficon%2Fmaster%2FSub-Store1.png` + +> 支持 Bark/PushPlus 等服务. 形如: `https://api.day.app/XXXXXXXXX/[推送标题]/[推送内容]?group=SubStore&autoCopy=1&isArchive=1&sound=shake&level=timeSensitive` 或 `http://www.pushplus.plus/send?token=XXXXXXXXX&title=[推送标题]&content=[推送内容]&channel=wechat` 的 URL, `[推送标题]` 和 `[推送内容]` 会被自动替换. + +``` +docker run -it -d --restart=always -e "SUB_STORE_PUSH_SERVICE=https://api.day.app/XXXXXXXXXXXX/[推送标题]/[推送内容]?group=SubStore&autoCopy=1&isArchive=1&sound=shake&level=timeSensitive&icon=https%3A%2F%2Fraw.githubusercontent.com%2F58xinian%2Ficon%2Fmaster%2FSub-Store1.png" -e "SUB_STORE_CRON=55 23 * * *" -e SUB_STORE_FRONTEND_BACKEND_PATH=/2cXaAxRGfddmGz2yx1wA -p 127.0.0.1:3001:3001 -v /root/sub-store-data:/opt/app/data --name sub-store xream/sub-store +``` \ No newline at end of file diff --git a/apps/sub-store/data.yml b/apps/sub-store/data.yml new file mode 100644 index 00000000..45ad1c63 --- /dev/null +++ b/apps/sub-store/data.yml @@ -0,0 +1,19 @@ +name: Sub-Store +tags: + - 工具 +title: 适用于 QX、Loon、Surge、Stash 和 Shadowrocket 的高级订阅管理器 +description: 适用于 QX、Loon、Surge、Stash 和 Shadowrocket 的高级订阅管理器 +additionalProperties: + key: sub-store + name: Sub-Store + tags: + - Tool + shortDescZh: 适用于 QX、Loon、Surge、Stash 和 Shadowrocket 的高级订阅管理器 + shortDescEn: Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://hub.docker.com/r/xream/sub-store + github: https://github.com/sub-store-org/Sub-Store + document: https://www.notion.so/Sub-Store-6259586994d34c11a4ced5c406264b46 diff --git a/apps/sub-store/latest/.env.sample b/apps/sub-store/latest/.env.sample new file mode 100644 index 00000000..965972f5 --- /dev/null +++ b/apps/sub-store/latest/.env.sample @@ -0,0 +1,6 @@ +CONTAINER_NAME="sub-store" +PANEL_APP_PORT_HTTP="40232" +DATA_PATH="./data" +SUB_STORE_CRON="55 23 * * *" +SUB_STORE_FRONTEND_BACKEND_PATH="/2cXaAxRGfddmGz2yx1wA" +SUB_STORE_PUSH_SERVICE="https://api.day.app/XXXXXXXXXXXX/[推送标题]/[推送内容]?group=SubStore&autoCopy=1&isArchive=1&sound=shake&level=timeSensitive&icon=https%3A%2F%2Fraw.githubusercontent.com%2F58xinian%2Ficon%2Fmaster%2FSub-Store1.png" diff --git a/apps/sub-store/latest/data.yml b/apps/sub-store/latest/data.yml new file mode 100644 index 00000000..25baadca --- /dev/null +++ b/apps/sub-store/latest/data.yml @@ -0,0 +1,38 @@ +additionalProperties: + formFields: + - default: 40232 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: 'https://api.day.app/XXXXXXXXXXXX/[推送标题]/[推送内容]?group=SubStore&autoCopy=1&isArchive=1&sound=shake&level=timeSensitive&icon=https%3A%2F%2Fraw.githubusercontent.com%2F58xinian%2Ficon%2Fmaster%2FSub-Store1.png' + edit: true + envKey: SUB_STORE_PUSH_SERVICE + labelEn: Push Service URL + labelZh: 推送服务 URL + required: true + type: text + - default: "55 23 * * *" + edit: true + envKey: SUB_STORE_CRON + labelEn: Cron Schedule + labelZh: Cron 定时任务 + required: true + type: text + - default: "/2cXaAxRGfddmGz2yx1wA" + edit: true + envKey: SUB_STORE_FRONTEND_BACKEND_PATH + labelEn: Frontend Backend Path + labelZh: 前端后端路径 + required: true + type: text + - default: "./data" + edit: true + envKey: DATA_PATH + labelEn: Data Directory + labelZh: 数据目录 + required: true + type: text diff --git a/apps/sub-store/latest/docker-compose.yml b/apps/sub-store/latest/docker-compose.yml new file mode 100644 index 00000000..f3dfefe1 --- /dev/null +++ b/apps/sub-store/latest/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' +services: + sub-store: + image: xream/sub-store:latest + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:3001" + environment: + - SUB_STORE_PUSH_SERVICE=${SUB_STORE_PUSH_SERVICE} + - SUB_STORE_CRON=${SUB_STORE_CRON} + - SUB_STORE_FRONTEND_BACKEND_PATH=${SUB_STORE_FRONTEND_BACKEND_PATH} + volumes: + - ${DATA_PATH}:/opt/app/data + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/sub-store/logo.png b/apps/sub-store/logo.png new file mode 100644 index 00000000..5215d6e0 Binary files /dev/null and b/apps/sub-store/logo.png differ