Files
appstore/apps/sub-store
okxlin 17c77d6033 fix(sub-store): expose configurable frontend origins
Add an optional editable CORS origin list for latest and http-meta, propagate
it through Compose, and backfill only missing upgrade configuration keys.
Document the installed Compose mapping needed before a same-tag rebuild.

Verified with eight real 1Panel v2.3.2 API scenarios and focused HTTP, data,
configuration and documentation checks. The complete app tree and runtime
image identities match the tested repair.
2026-11-09 04:05:05 +00:00
..
…
…

Sub-Store

产品介绍

Sub-Store 是适用于 Quantumult X、Loon、Surge、Stash、Egern 和 Shadowrocket 等客户端的高级订阅管理器。

本应用提供 latest 和 http-meta 两个镜像标签版本,均使用同一数据目录持久化配置。

主要功能

  • 管理、转换和组合多种代理订阅格式。
  • 支持订阅格式化、节点过滤、重命名和脚本处理。
  • 支持定时同步订阅和推送通知。
  • 可按需求选择 latest 或 http-meta 镜像标签。

访问说明

安装完成后,通过应用表单中的 HTTP 端口访问:

http://<服务器 IP>:<HTTP 端口>

SUB_STORE_BACKEND_SYNC_CRON 用于后端定时同步。旧变量 SUB_STORE_CRON 和 SUB_STORE_BACKEND_CRON 已被上游弃用。

使用自带前端或独立部署的前端时,在“允许的前端来源”中填写浏览器访问地址的 Origin,即协议、主机名及端口,例如 https://sub-store.example.com 或 http://192.168.1.10:40232。多个来源用逗号分隔,不包含后端路径。

SUB_STORE_CORS_ALLOWED_ORIGINS 留空时采用镜像默认白名单,仅使用官方前端时可留空。填写后会替换默认白名单;如需同时使用官方前端,也应将其 Origin 加入列表。请填写可信前端的实际来源,不使用 *。

旧安装同步应用库后,已安装的 Compose 仍可能使用旧模板。启用该参数前,先更新其中的环境变量映射。升级到包含该映射的新模板会更新编排;同一标签没有升级选项时,在 1Panel 中编辑已安装应用的编排,沿用现有服务名,并按其 environment 格式添加以下一项。

列表格式:

- SUB_STORE_CORS_ALLOWED_ORIGINS=${SUB_STORE_CORS_ALLOWED_ORIGINS:-}

键值格式:

SUB_STORE_CORS_ALLOWED_ORIGINS: ${SUB_STORE_CORS_ALLOWED_ORIGINS:-}

随后在应用参数中填写允许的前端来源并重建容器。升级脚本仅为缺少该参数的 .env 补齐空值,保留已有的空值或自定义来源。

Introduction

Sub-Store is an advanced subscription manager for Quantumult X, Loon, Surge, Stash, Egern, Shadowrocket, and related clients.

This app provides both latest and http-meta image-tag variants and persists configuration in the configured data directory.

Features

  • Manage, convert, and combine multiple proxy subscription formats.
  • Format subscriptions, filter nodes, rename entries, and run script processors.
  • Schedule backend sync jobs and push notifications.
  • Choose either the latest or http-meta image tag variant.

Frontend origins

When using the bundled frontend or a separately hosted frontend, set SUB_STORE_CORS_ALLOWED_ORIGINS to the browser URL's origin: scheme, hostname, and port, such as https://sub-store.example.com or http://192.168.1.10:40232. Separate multiple origins with commas and omit the backend path.

An empty value keeps the image's default allowlist for official frontends. A custom value replaces that allowlist, so include the official frontend's origin too if needed. List only trusted frontend origins and avoid *.

After syncing the app store, an existing installation may still use its previous Compose template. Update its environment variable mapping before enabling this parameter. Upgrading to a template that includes the mapping updates the Compose file; if the same tag has no upgrade option, edit the installed application's Compose in 1Panel, keep its existing service name, and add the entry using its current environment format.

List format:

- SUB_STORE_CORS_ALLOWED_ORIGINS=${SUB_STORE_CORS_ALLOWED_ORIGINS:-}

Mapping format:

SUB_STORE_CORS_ALLOWED_ORIGINS: ${SUB_STORE_CORS_ALLOWED_ORIGINS:-}

Then set the allowed frontend origins in the app parameters and rebuild the container. The upgrade script adds an empty value only when the key is absent and preserves existing empty or custom values.

应用简介

适用于 QX、Loon、Surge、Stash 和 Shadowrocket 的高级订阅管理器。

英文说明:Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.

部署说明

  • 本应用使用 Docker Compose 在 1Panel 中部署。
  • 应用分类:工具。
  • 支持架构:amd64。
  • 可选版本:latest、http-meta。
  • 安装后按应用表单中的 HTTP 端口访问 Web UI。

端口

变量 说明 默认值 必填
PANEL_APP_PORT_HTTP 端口 40232 是

数据持久化

变量 说明 默认值 必填
SUB_STORE_FRONTEND_BACKEND_PATH 前端后端路径 /2cXaAxRGfddmGz2yx1wA 是
DATA_PATH 数据目录 ./data 是

升级或迁移前,请在 1Panel 中备份上述数据目录。

配置项

变量 说明 默认值 必填
SUB_STORE_PUSH_SERVICE 推送服务 URL 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 是
SUB_STORE_BACKEND_SYNC_CRON Cron 定时任务 55 23 * * * 是
SUB_STORE_CORS_ALLOWED_ORIGINS 允许的前端来源,逗号分隔 留空使用镜像默认白名单 否

旧版本使用的 SUB_STORE_CRON、SUB_STORE_BACKEND_CRON 会在升级脚本中迁移为 SUB_STORE_BACKEND_SYNC_CRON;Compose 同时保留旧变量 fallback,避免同版本 latest 刷新时定时同步值丢失。升级或迁移前仍建议备份 DATA_PATH。

使用说明

  • 安装完成后,在 1Panel 应用页面查看运行状态、端口和日志。
  • 首次启用前,请按安装表单填写域名、账号、密码、Token、数据目录等参数。
  • 如需对外开放访问,请同步检查防火墙、安全组和反向代理配置。

参考资料