From edee10cee3e5c1ab9f06e541c1f08d50b62c8c5f Mon Sep 17 00:00:00 2001 From: Hsiaoyi <1210282+xream@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:03:59 +0800 Subject: [PATCH 1/3] Update Surge.sgmodule --- config/Surge.sgmodule | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/Surge.sgmodule b/config/Surge.sgmodule index df033f6..6452a1a 100644 --- a/config/Surge.sgmodule +++ b/config/Surge.sgmodule @@ -4,6 +4,7 @@ hostname=%APPEND% sub.store [Script] -Sub-Store=type=http-request,pattern=^https?:\/\/sub\.store,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store.min.js,requires-body=true,ability=http-client-policy +Sub-Store Core=type=http-request,pattern=^https?:\/\/sub\.store\/((download)|api\/(preview|sync|(utils\/node-info))),script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-1.min.js,requires-body=true,timeout=120,ability=http-client-policy +Sub-Store Simple=type=http-request,pattern=^https?:\/\/sub\.store,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-0.min.js,requires-body=true -Sub-Store Sync=type=cron,cronexp=0 0 * * *,wake-system=1,timeout=120,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/cron-sync-artifacts.min.js,ability=http-client-policy +Sub-Store Sync=type=cron,cronexp=0 0 * * *,wake-system=1,timeout=120,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/cron-sync-artifacts.min.js From 8e49a78f45265a0e228fdce40ef1b79bc85c84d9 Mon Sep 17 00:00:00 2001 From: xream Date: Wed, 26 Jul 2023 09:46:43 +0800 Subject: [PATCH 2/3] feat: V2Ray Producer --- backend/package.json | 2 +- backend/src/core/proxy-utils/producers/index.js | 2 ++ backend/src/core/proxy-utils/producers/v2ray.js | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 backend/src/core/proxy-utils/producers/v2ray.js diff --git a/backend/package.json b/backend/package.json index c4eb022..6623fb0 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.1", + "version": "2.14.2", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/producers/index.js b/backend/src/core/proxy-utils/producers/index.js index 412e378..c8b9dcf 100644 --- a/backend/src/core/proxy-utils/producers/index.js +++ b/backend/src/core/proxy-utils/producers/index.js @@ -3,6 +3,7 @@ import Clash_Producer from './clash'; import Stash_Producer from './stash'; import Loon_Producer from './loon'; import URI_Producer from './uri'; +import V2Ray_Producer from './v2ray'; import QX_Producer from './qx'; function JSON_Producer() { @@ -17,6 +18,7 @@ export default { Loon: Loon_Producer(), Clash: Clash_Producer(), URI: URI_Producer(), + V2Ray: V2Ray_Producer(), JSON: JSON_Producer(), Stash: Stash_Producer(), }; diff --git a/backend/src/core/proxy-utils/producers/v2ray.js b/backend/src/core/proxy-utils/producers/v2ray.js new file mode 100644 index 0000000..be3370a --- /dev/null +++ b/backend/src/core/proxy-utils/producers/v2ray.js @@ -0,0 +1,12 @@ +/* eslint-disable no-case-declarations */ +import { Base64 } from 'js-base64'; +import URI_Producer from './uri'; + +const URI = URI_Producer(); + +export default function V2Ray_Producer() { + const type = 'ALL'; + const produce = (proxies) => + Base64.encode(proxies.map((proxy) => URI.produce(proxy)).join('\n')); + return { type, produce }; +} From fc90e22a487cf08095a249cc89cb20d3a7902a0a Mon Sep 17 00:00:00 2001 From: Hsiaoyi <1210282+xream@users.noreply.github.com> Date: Fri, 28 Jul 2023 22:38:36 +0800 Subject: [PATCH 3/3] Added Surge-Noability.sgmodule --- config/Surge-Noability.sgmodule | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 config/Surge-Noability.sgmodule diff --git a/config/Surge-Noability.sgmodule b/config/Surge-Noability.sgmodule new file mode 100644 index 0000000..970d6b2 --- /dev/null +++ b/config/Surge-Noability.sgmodule @@ -0,0 +1,12 @@ +#!name=Sub-Store +#!desc=高级订阅管理工具 @Peng-YM 无 ability 参数版本,不会爆内存, 如果需要使用指定节点功能 例如[加国旗脚本或者cname脚本] 可以用原版 + +[MITM] +hostname = %APPEND% sub.store + +[Script] +# 主程序 已经去掉 Sub-Store Core 的参数 [,ability=http-client-policy] 不会爆内存,这个参数在 Surge 非常占用内存; 如果不需要使用指定节点功能 例如[加国旗脚本或者cname脚本] 则可以使用此脚本 +Sub-Store Core=type=http-request,pattern=^https?:\/\/sub\.store\/((download)|api\/(preview|sync|(utils\/node-info))),script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-1.min.js,requires-body=true,timeout=120 +Sub-Store Simple=type=http-request,pattern=^https?:\/\/sub\.store,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-0.min.js,requires-body=true + +Sub-Store Sync=type=cron,cronexp=0 0 * * *,wake-system=1,timeout=120,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/cron-sync-artifacts.min.js