mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98892fa100 | ||
|
|
6e2411e2c2 | ||
|
|
b3f6876bbd |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.19.37",
|
"version": "2.19.39",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Base64 } from 'js-base64';
|
||||||
import { Buffer } from 'buffer';
|
import { Buffer } from 'buffer';
|
||||||
import rs from '@/utils/rs';
|
import rs from '@/utils/rs';
|
||||||
import YAML from '@/utils/yaml';
|
import YAML from '@/utils/yaml';
|
||||||
@@ -333,6 +334,8 @@ export const ProxyUtils = {
|
|||||||
downloadFile,
|
downloadFile,
|
||||||
isValidUUID,
|
isValidUUID,
|
||||||
doh,
|
doh,
|
||||||
|
Buffer,
|
||||||
|
Base64,
|
||||||
};
|
};
|
||||||
|
|
||||||
function tryParse(parser, line) {
|
function tryParse(parser, line) {
|
||||||
|
|||||||
@@ -86,10 +86,10 @@ vmess = "vmess" equals address
|
|||||||
(uuid/method/over_tls/tls_host/tls_pubkey_sha256/tls_alpn/tls_no_session_ticket/tls_no_session_reuse/tls_fingerprint/tls_verification/tag/obfs/obfs_host/obfs_uri/udp_relay/udp_over_tcp/fast_open/aead/server_check_url/others)* {
|
(uuid/method/over_tls/tls_host/tls_pubkey_sha256/tls_alpn/tls_no_session_ticket/tls_no_session_reuse/tls_fingerprint/tls_verification/tag/obfs/obfs_host/obfs_uri/udp_relay/udp_over_tcp/fast_open/aead/server_check_url/others)* {
|
||||||
proxy.type = "vmess";
|
proxy.type = "vmess";
|
||||||
proxy.cipher = proxy.cipher || "none";
|
proxy.cipher = proxy.cipher || "none";
|
||||||
if (proxy.aead) {
|
if (proxy.aead === false) {
|
||||||
proxy.alterId = 0;
|
proxy.alterId = 1;
|
||||||
} else {
|
} else {
|
||||||
proxy.alterId = proxy.alterId || 0;
|
proxy.alterId = 0;
|
||||||
}
|
}
|
||||||
handleObfs();
|
handleObfs();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,10 +84,10 @@ vmess = "vmess" equals address
|
|||||||
(uuid/method/over_tls/tls_host/tls_pubkey_sha256/tls_alpn/tls_no_session_ticket/tls_no_session_reuse/tls_fingerprint/tls_verification/tag/obfs/obfs_host/obfs_uri/udp_relay/udp_over_tcp/fast_open/aead/server_check_url/others)* {
|
(uuid/method/over_tls/tls_host/tls_pubkey_sha256/tls_alpn/tls_no_session_ticket/tls_no_session_reuse/tls_fingerprint/tls_verification/tag/obfs/obfs_host/obfs_uri/udp_relay/udp_over_tcp/fast_open/aead/server_check_url/others)* {
|
||||||
proxy.type = "vmess";
|
proxy.type = "vmess";
|
||||||
proxy.cipher = proxy.cipher || "none";
|
proxy.cipher = proxy.cipher || "none";
|
||||||
if (proxy.aead) {
|
if (proxy.aead === false) {
|
||||||
proxy.alterId = 0;
|
proxy.alterId = 1;
|
||||||
} else {
|
} else {
|
||||||
proxy.alterId = proxy.alterId || 0;
|
proxy.alterId = 0;
|
||||||
}
|
}
|
||||||
handleObfs();
|
handleObfs();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1141,6 +1141,10 @@ function createDynamicFunction(name, script, $arguments, $options) {
|
|||||||
'$httpClient',
|
'$httpClient',
|
||||||
'$notification',
|
'$notification',
|
||||||
'ProxyUtils',
|
'ProxyUtils',
|
||||||
|
'yaml',
|
||||||
|
'Buffer',
|
||||||
|
'b64d',
|
||||||
|
'b64e',
|
||||||
'scriptResourceCache',
|
'scriptResourceCache',
|
||||||
'flowUtils',
|
'flowUtils',
|
||||||
'produceArtifact',
|
'produceArtifact',
|
||||||
@@ -1158,6 +1162,10 @@ function createDynamicFunction(name, script, $arguments, $options) {
|
|||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
$notification,
|
$notification,
|
||||||
ProxyUtils,
|
ProxyUtils,
|
||||||
|
ProxyUtils.yaml,
|
||||||
|
ProxyUtils.Buffer,
|
||||||
|
ProxyUtils.Base64.decode,
|
||||||
|
ProxyUtils.Base64.encode,
|
||||||
scriptResourceCache,
|
scriptResourceCache,
|
||||||
flowUtils,
|
flowUtils,
|
||||||
produceArtifact,
|
produceArtifact,
|
||||||
@@ -1170,6 +1178,10 @@ function createDynamicFunction(name, script, $arguments, $options) {
|
|||||||
'$substore',
|
'$substore',
|
||||||
'lodash',
|
'lodash',
|
||||||
'ProxyUtils',
|
'ProxyUtils',
|
||||||
|
'yaml',
|
||||||
|
'Buffer',
|
||||||
|
'b64d',
|
||||||
|
'b64e',
|
||||||
'scriptResourceCache',
|
'scriptResourceCache',
|
||||||
'flowUtils',
|
'flowUtils',
|
||||||
'produceArtifact',
|
'produceArtifact',
|
||||||
@@ -1181,6 +1193,10 @@ function createDynamicFunction(name, script, $arguments, $options) {
|
|||||||
$,
|
$,
|
||||||
lodash,
|
lodash,
|
||||||
ProxyUtils,
|
ProxyUtils,
|
||||||
|
ProxyUtils.yaml,
|
||||||
|
ProxyUtils.Buffer,
|
||||||
|
ProxyUtils.Base64.decode,
|
||||||
|
ProxyUtils.Base64.encode,
|
||||||
scriptResourceCache,
|
scriptResourceCache,
|
||||||
flowUtils,
|
flowUtils,
|
||||||
produceArtifact,
|
produceArtifact,
|
||||||
|
|||||||
@@ -34,4 +34,6 @@ export default {
|
|||||||
load,
|
load,
|
||||||
safeDump,
|
safeDump,
|
||||||
dump,
|
dump,
|
||||||
|
parse: safeLoad,
|
||||||
|
stringify: safeDump,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -120,7 +120,10 @@ function operator(proxies = [], targetPlatform, context) {
|
|||||||
// downloadFile, // 下载二进制文件, 见 backend/src/utils/download.js
|
// downloadFile, // 下载二进制文件, 见 backend/src/utils/download.js
|
||||||
// MMDB, // Node.js 环境 可用于模拟 Surge/Loon 的 $utils.ipasn, $utils.ipaso, $utils.geoip. 具体见 https://t.me/zhetengsha/1269
|
// MMDB, // Node.js 环境 可用于模拟 Surge/Loon 的 $utils.ipasn, $utils.ipaso, $utils.geoip. 具体见 https://t.me/zhetengsha/1269
|
||||||
// isValidUUID, // 辅助判断是否为有效的 UUID
|
// isValidUUID, // 辅助判断是否为有效的 UUID
|
||||||
|
// Buffer, // https://github.com/feross/buffer
|
||||||
|
// Base64, // https://github.com/dankogai/js-base64
|
||||||
// }
|
// }
|
||||||
|
// 为兼容 https://github.com/xishang0128/sparkle 的 JavaScript 覆写, 也可以直接使用 `b64d`(Base64 解码), `b64e`(Base64 编码), `Buffer`, `yaml`(简单兼容了下 `yaml.parse` 和 `yaml.stringify`)
|
||||||
|
|
||||||
// 如果只是为了快速修改或者筛选 可以参考 脚本操作支持节点快捷脚本 https://t.me/zhetengsha/970 和 脚本筛选支持节点快捷脚本 https://t.me/zhetengsha/1009
|
// 如果只是为了快速修改或者筛选 可以参考 脚本操作支持节点快捷脚本 https://t.me/zhetengsha/970 和 脚本筛选支持节点快捷脚本 https://t.me/zhetengsha/1009
|
||||||
// ⚠️ 注意: 函数式(即本文件这样的 function operator() {}) 和快捷操作(下面使用 $server) 只能二选一
|
// ⚠️ 注意: 函数式(即本文件这样的 function operator() {}) 和快捷操作(下面使用 $server) 只能二选一
|
||||||
|
|||||||
Reference in New Issue
Block a user