feat: 新增新版 Loon 3.5.0(969)及以上版本的资源解析器插件

This commit is contained in:
xream committed 2026-06-11 23:46:22 +08:00
1 parent e72a39439b
commit eba921e3aa
4 files changed
+46 -5

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.24.16",
"version": "2.24.17",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"packageManager": "pnpm@11.0.9",
+20 -3
View File
@@ -1,4 +1,17 @@
/* eslint-disable no-undef */
/**
* $resourceType: 解析器脚本自带全局变量,资源类型,枚举,详见下方
* $resource: 解析器脚本自带全局变量,资源内容,string
* $resourceUrl: 解析器脚本自带全局变量,资源url,string
*
* 资源类型
* 0:config
* 1:nodes
* 2:rules
* 3:rewrites
* 4:scripts
* 5:plugin
*/
import { ProxyUtils } from '@/core/proxy-utils';
import { RuleUtils } from '@/core/rule-utils';
import { version } from '../../package.json';
@@ -27,9 +40,13 @@ let resourceUrl = typeof $resourceUrl !== 'undefined' ? $resourceUrl : '';
let arg;
if (typeof $argument != 'undefined') {
arg = Object.fromEntries(
$argument.split('&').map((item) => item.split('=')),
);
if (typeof $argument === 'string') {
arg = Object.fromEntries(
$argument.split('&').map((item) => item.split('=')),
);
} else {
arg = $argument;
}
} else {
arg = {};
}
+21
View File
@@ -0,0 +1,21 @@
#!name=Loon 订阅解析器
#!desc=专门用于解析订阅节点的插件, 需 Loon 3.5.0(969)及以上版本. 若需要完整版 Sub-Store, 请使用 Sub-Store Loon 插件
#!tag=解析器,官方,Demo
#!system=
#!system_version=
#!loon_version=3.5.0(969)
#!openUrl=https://sub.store
#!author=Peng-YM
#!homepage=https://github.com/sub-store-org/Sub-Store
#!icon=https://raw.githubusercontent.com/58xinian/icon/master/Sub-Store1.png
#!type=parser
[Argument]
resourceUrlOnly = switch,true,tag=仅使用远程资源 忽略 Loon 自身解析数据,desc=忽略 Loon 自身解析数据
ua = input,"",tag=拉取订阅的 User-Agent,desc=拉取订阅的 User-Agent
timeout = input,8000,tag=拉取订阅时使用的超时时间,desc=拉取订阅时使用的超时时间
noCache = switch,false,tag=禁用缓存,desc=禁用缓存
age-secret-key = input,"",tag=age 解密私钥,desc=age 解密私钥 可查看 https://t.me/zhetengsha/5876
[Script]
generic script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-parser.loon.min.js,tag=Sub-Store Parser,timeout=120,argument=[{ua},{resourceUrlOnly},{noCache},{timeout},{age-secret-key}]
+4 -1
View File
@@ -28,7 +28,10 @@ SUB_STORE_CORS_ALLOWED_ORIGINS=https://sub-store.vercel.app,http://127.0.0.1:888
安装使用 插件 [`https://raw.githubusercontent.com/sub-store-org/Sub-Store/master/config/Loon.plugin`](https://raw.githubusercontent.com/sub-store-org/Sub-Store/master/config/Loon.plugin) 即可。
资源解析器中使用 [https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-parser.loon.min.js](https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-parser.loon.min.js)
新版 Loon 3.5.0(969)及以上版本 使用资源解析器插件 [`https://raw.githubusercontent.com/sub-store-org/Sub-Store/master/config/Loon-parser.plugin`](https://raw.githubusercontent.com/sub-store-org/Sub-Store/master/config/Loon-parser.plugin)
旧版 Loon 在资源解析器中使用 [https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-parser.loon.min.js](https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-parser.loon.min.js)
详见 [Loon 资源解析器说明](https://github.com/sub-store-org/Sub-Store/wiki/Loon-%E8%B5%84%E6%BA%90%E8%A7%A3%E6%9E%90%E5%99%A8%E8%AF%B4%E6%98%8E)
### 2. Surge