feat: VMess 输入 network 默认值为 tcp

This commit is contained in:
xream committed 2026-01-02 03:55:21 +08:00
1 parent d0cd900765
commit 38dd713382
4 files changed
+13 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.20.66",
"version": "2.20.67",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {
+3
View File
@@ -445,6 +445,9 @@ function lastParse(proxy) {
if (['vmess'].includes(proxy.type)) {
proxy.cipher = proxy.cipher || 'none';
proxy.alterId = proxy.alterId || 0;
if (!proxy.network) {
proxy.network = 'tcp';
}
}
if (['vless'].includes(proxy.type)) {
if (!proxy.network) {
@@ -219,7 +219,9 @@ function handleTransport(result, proxy) {
}
}
}
} else if (!['tcp'].includes(proxy.network)) {
} else if (['tcp'].includes(proxy.network) && proxy['reality-opts']) {
throw new Error(`reality is unsupported`);
} else {
throw new Error(`network ${proxy.network} is unsupported`);
}
}
@@ -1226,7 +1226,12 @@ function handleTransport(result, proxy, includeUnsupportedProxy) {
$.info(
`Include Unsupported Proxy: network ${proxy.network} -> tcp`,
);
} else if (!['tcp'].includes(proxy.network)) {
} else if (
['tcp'].includes(proxy.network) &&
proxy['reality-opts']
) {
throw new Error(`reality is unsupported`);
} else {
throw new Error(`network ${proxy.network} is unsupported`);
}
}