Cool Scripts
16.6K subscribers
364 photos
24 videos
3 files
627 links
QuanX, Loon, Surge, JsBox, Pythonista, Scriptable, Shortcuts等脚本分享
Download Telegram
🔗 Sub-Store

🆕 2.14.120

🟢脚本筛选支持节点快捷脚本. 语法与 Shadowrocket 脚本类似. 但是 Sub-Store 节点字段和 Shadowrocket 字段不同.

可先查看预览中的节点 JSON 数据 或 查看 通用订阅 或 手动打开 ?target=JSON 查看字段名 再进行修改

const port = Number($server.port)

return [80, 443].includes(port)


相关: 脚本操作支持节点快捷脚本. 语法与 Shadowrocket 脚本类似
Please open Telegram to view this post
VIEW IN TELEGRAM
4👍1
🔗 Sub-Store

🆕 2.14.126

🟢 修复 Loon Trojan WS 传输层

🟢 Node.js 前端代理后端路由 需设置环境变量 注意安全

SUB_STORE_FRONTEND_BACKEND_PATH=/2cXaAxRGfddmGz2yx1wA SUB_STORE_FRONTEND_PATH=/root/sub-store/frontend SUB_STORE_FRONTEND_HOST=127.0.0.1 SUB_STORE_FRONTEND_PORT=3001 SUB_STORE_DATA_BASE_PATH=/root/sub-store SUB_STORE_BACKEND_API_HOST=127.0.0.1 SUB_STORE_BACKEND_API_PORT=3000 node sub-store.bundle.js


配置 3001 端口的反代后
https://frontend.com?api=https://frontend.com/2cXaAxRGfddmGz2yx1wA
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
🔗 Sub-Store

🆕 2.14.127

🟢Node.js 支持使用环境变量 SUB_STORE_DATA_URL 设置一个远程数据文件链接

这样每次启动都会从这个地址拉取并恢复数据

使用场景: 云平台重新部署后自动恢复之前备份的数据
Please open Telegram to view this post
VIEW IN TELEGRAM
🔗 Sub-Store

🆕 2.14.129

🟢过滤 🏂 Stash/ 🐱 Clash Shadowsocks cipher

🟢Hysteria2 URI 输入支持 hy2://
Please open Telegram to view this post
VIEW IN TELEGRAM
1
🔗 Sub-Store

🆕 2.14.130

🟢兼容部分不规范的机场和代理 App

当 Hysteria/Hysteria2 端口跳跃字段为空时, 删除此字段
Please open Telegram to view this post
VIEW IN TELEGRAM
1
🔗 Sub-Store

🆕 2.14.131

🟢支持忽略失败的远程订阅

前端版本 > 2.14.20 可进行配置

开启后 依赖的远程订阅出错时 不会报错了 需要自行查看日志

👍 组合订阅 与 订阅中的多行订阅 都支持这个开关

同时支持 URL 参数覆盖, 例如: /download/collection/all?target=Surge&ignoreFailedRemoteSub=true

❗️ 超时导致的无法更新外部资源请看 超时设置
Please open Telegram to view this post
VIEW IN TELEGRAM
8👍5
🔗 Sub-Store

🆕 2.14.133

🟢当节点端口号为合法端口号时, 将类型转为整数(便于脚本判断, 不需要再转换 port 的类型)

👨‍💻 前端(版本 2.14.24) 更换了新的通知横幅

失去焦点或有交互时 不会自动消失 可以慢慢查看错误信息 🍉
Please open Telegram to view this post
VIEW IN TELEGRAM
👍4
🔗 Sub-Store

🆕 前端 更新 2.14.27

🟢前端节点操作中的多个正则支持拖拽排序
Please open Telegram to view this post
VIEW IN TELEGRAM
3👍2
🔗 Sub-Store

🆕 前端 2.14.28, 后端 2.14.134

🟢支持 ⚠️ Surfboard
Please open Telegram to view this post
VIEW IN TELEGRAM
9👍5
🔗 Sub-Store

🆕 后端 2.14.139

🟢Node.js 版的通知支持第三方推送服务

环境变量名 SUB_STORE_PUSH_SERVICE

支持 Bark/PushPlus 等服务

形如: 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



http://www.pushplus.plus/send?token=XXXXXXXXX&title=[推送标题]&content=[推送内容]&channel=wechat


URL 中的 [推送标题][推送内容] 会被自动替换

👍不要再问支不支持 XX 服务, 已经约等于支持任何能进行 GET 请求的第三方推送服务了

❗️ Sub-Store 服务器/云平台/Docker/Android 版的相关教程
Please open Telegram to view this post
VIEW IN TELEGRAM
👍31
🔗 Sub-Store

🆕 后端 2.14.141 前端 2.14.30

🟢兼容部分不带参数/不带节点名的 URI 输入

🟢支持设置全局请求超时

暂时只支持全局修改 再观察一下

一般代理 app 加载外部资源有自己的超时

有时候某些远程订阅超时, 可能会导致组合订阅整体拉取的时长超过此时长. 可设置此参数, 保证组合订阅能在代理 app 内拉取成功

❗️ Sub-Store 服务器/云平台/Docker/Android 版的相关教程
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3
🔗 Sub-Store

🆕 前端 2.14.32

🟢默认隐藏悬浮刷新按钮(可在设置中切换)

PS: 悬浮操作按钮式是可以拖动的
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
🥰31
🔗 Sub-Store

🆕 前端 2.14.38 后端 2.14.146

👨‍💻 新增文件功能

🟢文件支持本地/远程, 按顺序合并, 忽略失败的远程文件

🟢文件支持脚本操作和预览

🟢可使用链接访问文件内容

🟢可将文件内容同步到 Gist

🟢可在脚本操作中使用 /api/file/name 访问内部文件

🟢接口 /api/file/name 支持参数覆盖

❗️ 使用场景

🟢在脚本操作复用内部文件

🟢🔗 Sub-Store 统一管理配置文件/规则集/脚本/模块

🟢对本地/远程的文本内容进行合并, 脚本操作

🟢利用参数覆盖功能 复用工作流模板 /api/file/name?url=&content=&ua=&mergeSources&ignoreFailedRemoteFile

服务器版直接使用链接

非服务器版 本设备使用 或 同步到 Gist 供其他设备使用

🛠️ Sub-Store 服务器/云平台/Docker/Android 版的相关教程

改动较大 有问题大家及时反馈(
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
7🔥2
🚀 Shadowrocket 测试版更新

Version 2.2.45 (2163)

测试内容:
* fix http request script early response issue

此版本的🚀 Shadowrocket🔗 Sub-Store 无法同步到 Gist 的问题已确认修复
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥1🥰1
🔗 Sub-Store 文件动态生成 📦 sing-box 配置示例

🆕 查看最新版带参数规则的脚本

———

💃 亚托莉佬的模板和远程脚本

远程文件填 链接1 链接2
脚本操作填链接 https://raw.githubusercontent.com/xishang0128/sub-store-template/main/sing-box.js#type=1&name=name // "1" 表示组合订阅, name 为订阅的 "名称", 具体看文件中的说明

⚠️ 此脚本与此模板配套 如果要用自定义模板/有自定义脚本的需求 可使用👇🏻的方案自己动手 或者 查看最新版带参数规则的脚本

1.1 使用远程模板

远程链接 中 第一行为 sing-box 模板文件链接
例: https://a.com/sing-box.tpl.json

1.2 或者使用本地模板
本地文本 中为 sing-box 模板文件的内容

假设 你的 sing-box 模板文件中的 outbounds 是这样的: { "outbounds": [ { "tag": "全部节点", "type": "selector", "default": "urltest", "outbounds": [ "美国节点" ] }, { "tag": "美国节点", "type": "urltest", "outbounds": [] } ] }

脚本操作:
let config = JSON.parse($files[0]) // 文件中的第一个
let proxies = await produceArtifact({
type: 'subscription', // 如果是组合订阅 就是 'collection'
name: '订阅的name', // 订阅的"名称", 不是"显示名称"
platform: 'sing-box',
produceType: 'internal'
})

// 先将全部节点结构插到 outbounds
config.outbounds.push(...proxies)

config.outbounds.map(i => {
// 在 全部节点 中插入全部节点名
if (['全部节点'].includes(i.tag)) {
i.outbounds.push(...proxies.map(p => p.tag))
}
// 在 美国节点 中插入全部美国节点名
if (['美国节点'].includes(i.tag)) {
i.outbounds.push(...proxies.filter(p => /美国|🇺🇸|us|united states/i.test(p.tag)).map(p => p.tag))
}
})

$content = JSON.stringify(config, null, 2)


▎其他示例(YAML, JSON):

let singboxProxies = await produceArtifact({
type: 'subscription', // type: 'subscription' 或 'collection'
name: 'sub', // subscription name
platform: 'sing-box', // target platform
produceType: 'internal' // 'internal' produces an Array, otherwise produces a String( JSON.parse('JSON String') )
})

let clashMetaProxies = await produceArtifact({
type: 'subscription',
name: 'sub',
platform: 'ClashMeta',
produceType: 'internal' // 'internal' produces an Array, otherwise produces a String( ProxyUtils.yaml.safeLoad('YAML String').proxies )
}))

// YAML
$content = ProxyUtils.yaml.safeDump({})

// JSON
$content = JSON.stringify({}, null, 2)


🎲 Sub-Store 代理 App 版安装下载

🛠 Sub-Store 服务器/云平台/Docker/Android 版的相关教程
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
👍86🤔2😍1