TGViewer
Cool Scripts Cool Scripts @cool_scripts · 16.3K subscribers
Post #487 4.54K
🔗 Sub-Store 文件动态生成 📦 sing-box 配置示例

🆕 新增远程脚本链接 可配置参数自定义将哪些节点插入哪些 outbound 中

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

远程文件填 链接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 模板文件的内容

使用脚本操作 填入链接:

https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/sing-box/template.js#type=组合订阅&name=机场&outbound=🕳ℹ️all|all-auto🕳ℹ️hk|hk-auto🏷ℹ️港|hk|hongkong|kong kong|🇭🇰🕳ℹ️tw|tw-auto🏷ℹ️台|tw|taiwan|🇹🇼🕳ℹ️jp|jp-auto🏷ℹ️日本|jp|japan|🇯🇵🕳ℹ️sg|sg-auto🏷ℹ️^(?!.*(?:us)).*(新|sg|singapore|🇸🇬)🕳ℹ️us|us-auto🏷ℹ️美|us|unitedstates|united states|🇺🇸

示例表示:

读取 名称为 "机场" 的 组合订阅 中的节点(单订阅不需要设置 type 参数)
把 所有节点插入匹配 /all|all-auto/i 的 outbound 中(跟在 🕳 后面, ℹ️ 表示忽略大小写, 不筛选节点不需要给 🏷 )
把匹配 /港|hk|hongkong|kong kong|🇭🇰/i (跟在 🏷 后面, ℹ️ 表示忽略大小写) 的节点插入匹配 /hk|hk-auto/i 的 outbound 中
...

⚠️ 如果 outbounds 为空, 自动创建 COMPATIBLE(direct) 并插入 防止报错

如果想完全手写 可参考 https://t.me/cool_scripts/483

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

🛠 Sub-Store 服务器/云平台/Docker/Android 版的相关教程
  • ❤ 7
  • 🥰 2
More from @cool_scripts
  1. Sep 27, 2026🔗 Sub-Store 更新 ⚙️ 后端: 2.42.0 🌐 前端: 2.34.0 ▎使用 shoutrrr-ts Docker 版也移除了 shoutrrr 二进制 感谢 D…
  2. Sep 26, 2026🔗 Sub-Store 更新 ⚙️ 后端: 2.41.1 🌐 前端: 2.34.0 ▎调整 sing-box SSH 密钥逻辑 感谢群友 shica 的反馈 ▎调整 SS UR…
  3. Sep 23, 2026🔗 Sub-Store 更新 ⚙️ 后端: 2.41.0 🌐 前端: 2.34.0 ▎📦 sing-box WireGuard/Tailscale 支持一些 sing-box…
  4. Sep 19, 2026🔗 Sub-Store 更新 ⚙️ 后端: 2.39.9 🌐 前端: 2.32.2 ▎🎈 Loon 支持 server-dns 用于指定解析节点服务器域名的 DNS Loon…
  5. Sep 12, 2026🔗 Sub-Store 更新 ⚙️ 后端: 2.39.6 🌐 前端: 2.32.2 ▎🐿️ Egern 支持转换 ip-version 感谢群友 shica 的反馈 自动转换…
  6. Sep 11, 2026🔗 Sub-Store 更新 ⚙️ 后端: 2.39.4 🌐 前端: 2.32.0 ▎SubCase 1.3 新增通知栏快捷开关 (Quick Settings Tile) 新…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →