mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-12-01 08:51:41 +00:00
feat: VMess 输入 network 默认值为 tcp
This commit is contained in:
4 files changed
+13
-3
No files matched your search
@@ -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": {
|
||||
|
||||
@@ -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`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user