diff --git a/backend/package.json b/backend/package.json index 4c8546a..9d12891 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.16.49", + "version": "2.16.50", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/index.js b/backend/src/core/proxy-utils/index.js index bb83f7a..5ad0993 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -81,9 +81,9 @@ function parse(raw) { if (['vless', 'vmess'].includes(proxy.type)) { const isProxyUUIDValid = isValidUUID(proxy.uuid); if (!isProxyUUIDValid) { - $.error(`UUID is invalid: ${proxy.name} ${proxy.uuid}`); + $.error(`UUID may be invalid: ${proxy.name} ${proxy.uuid}`); } - return isProxyUUIDValid; + // return isProxyUUIDValid; } return true; }); @@ -235,8 +235,8 @@ function produce(proxies, targetPlatform, type, opts = {}) { if (['vless', 'vmess'].includes(proxy.type)) { const isProxyUUIDValid = isValidUUID(proxy.uuid); if (!isProxyUUIDValid) - $.error(`UUID is invalid: ${proxy.name} ${proxy.uuid}`); - return isProxyUUIDValid; + $.error(`UUID may be invalid: ${proxy.name} ${proxy.uuid}`); + // return isProxyUUIDValid; } return true; @@ -326,6 +326,7 @@ export const ProxyUtils = { MMDB, Gist, download, + isValidUUID, }; function tryParse(parser, line) { diff --git a/scripts/demo.js b/scripts/demo.js index 742b44d..db4b982 100644 --- a/scripts/demo.js +++ b/scripts/demo.js @@ -24,6 +24,10 @@ function operator(proxies = [], targetPlatform, context) { // 16. `sing-box` 支持使用 `_network` 来设置 `network`, 例如 `tcp`, `udp` // require 为 Node.js 的 require, 在 Node.js 运行环境下 可以用来引入模块 + // 例如在 Node.js 环境下, 将文件内容写入 /tmp/1.txt 文件 + // const fs = eval(`require("fs")`) + // // const path = eval(`require("path")`) + // fs.writeFileSync('/tmp/1.txt', $content, "utf8"); // $arguments 为传入的脚本参数 @@ -69,6 +73,7 @@ function operator(proxies = [], targetPlatform, context) { // Gist, // Gist 类 // download, // 内部的下载方法, 见 backend/src/utils/download.js // MMDB, // Node.js 环境 可用于模拟 Surge/Loon 的 $utils.ipasn, $utils.ipaso, $utils.geoip. 具体见 https://t.me/zhetengsha/1269 + // isValidUUID, // 辅助判断是否为有效的 UUID // } // 如果只是为了快速修改或者筛选 可以参考 脚本操作支持节点快捷脚本 https://t.me/zhetengsha/970 和 脚本筛选支持节点快捷脚本 https://t.me/zhetengsha/1009