mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-12-02 01:12:56 +00:00
feat: 筛选掉不支持 http upgrade 的节点
This commit is contained in:
8 files changed
+55
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.20.79",
|
||||
"version": "2.20.80",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -47,6 +47,11 @@ export default function Clash_Producer() {
|
||||
proxy['reality-opts']))
|
||||
) {
|
||||
return false;
|
||||
} else if (
|
||||
['ws'].includes(proxy.network) &&
|
||||
proxy['ws-opts']?.['v2ray-http-upgrade']
|
||||
) {
|
||||
return false;
|
||||
} else if (proxy['underlying-proxy'] || proxy['dialer-proxy']) {
|
||||
$.error(
|
||||
`Clash 不支持前置代理字段. 已过滤节点 ${proxy.name}`,
|
||||
|
||||
@@ -67,6 +67,11 @@ export default function Egern_Producer() {
|
||||
proxy.token.length !== 0)
|
||||
) {
|
||||
return false;
|
||||
} else if (
|
||||
['ws'].includes(proxy.network) &&
|
||||
proxy['ws-opts']?.['v2ray-http-upgrade']
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
|
||||
@@ -13,6 +13,14 @@ const ipVersions = {
|
||||
|
||||
export default function Loon_Producer() {
|
||||
const produce = (proxy, type, opts = {}) => {
|
||||
if (
|
||||
['ws'].includes(proxy.network) &&
|
||||
proxy['ws-opts']?.['v2ray-http-upgrade']
|
||||
) {
|
||||
throw new Error(
|
||||
`Platform ${targetPlatform} does not support network ${proxy.network} with http upgrade`,
|
||||
);
|
||||
}
|
||||
switch (proxy.type) {
|
||||
case 'ss':
|
||||
return shadowsocks(proxy);
|
||||
@@ -398,7 +406,8 @@ function vmess(proxy) {
|
||||
}
|
||||
|
||||
function vless(proxy) {
|
||||
if (proxy.encryption && proxy.encryption !== 'none') throw new Error(`VLESS encryption is not supported`);
|
||||
if (proxy.encryption && proxy.encryption !== 'none')
|
||||
throw new Error(`VLESS encryption is not supported`);
|
||||
let isXtls = false;
|
||||
const isReality = !!proxy['reality-opts'];
|
||||
|
||||
|
||||
@@ -5,6 +5,14 @@ const targetPlatform = 'QX';
|
||||
export default function QX_Producer() {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const produce = (proxy, type, opts = {}) => {
|
||||
if (
|
||||
['ws'].includes(proxy.network) &&
|
||||
proxy['ws-opts']?.['v2ray-http-upgrade']
|
||||
) {
|
||||
throw new Error(
|
||||
`Platform ${targetPlatform} does not support network ${proxy.network} with http upgrade`,
|
||||
);
|
||||
}
|
||||
switch (proxy.type) {
|
||||
case 'ss':
|
||||
return shadowsocks(proxy);
|
||||
|
||||
@@ -70,7 +70,16 @@ export default function Stash_Producer() {
|
||||
return false;
|
||||
} else if (['xhttp'].includes(proxy.network)) {
|
||||
return false;
|
||||
} else if (proxy.encryption && proxy.encryption !== 'none' && ['vless'].includes(proxy.type)) {
|
||||
} else if (
|
||||
proxy.encryption &&
|
||||
proxy.encryption !== 'none' &&
|
||||
['vless'].includes(proxy.type)
|
||||
) {
|
||||
return false;
|
||||
} else if (
|
||||
['ws'].includes(proxy.network) &&
|
||||
proxy['ws-opts']?.['v2ray-http-upgrade']
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -6,6 +6,14 @@ const targetPlatform = 'Surfboard';
|
||||
|
||||
export default function Surfboard_Producer() {
|
||||
const produce = (proxy) => {
|
||||
if (
|
||||
['ws'].includes(proxy.network) &&
|
||||
proxy['ws-opts']?.['v2ray-http-upgrade']
|
||||
) {
|
||||
throw new Error(
|
||||
`Platform ${targetPlatform} does not support network ${proxy.network} with http upgrade`,
|
||||
);
|
||||
}
|
||||
proxy.name = proxy.name.replace(/=|,/g, '');
|
||||
switch (proxy.type) {
|
||||
case 'ss':
|
||||
|
||||
@@ -14,6 +14,14 @@ const ipVersions = {
|
||||
|
||||
export default function Surge_Producer() {
|
||||
const produce = (proxy, type, opts = {}) => {
|
||||
if (
|
||||
['ws'].includes(proxy.network) &&
|
||||
proxy['ws-opts']?.['v2ray-http-upgrade']
|
||||
) {
|
||||
throw new Error(
|
||||
`Platform ${targetPlatform} does not support network ${proxy.network} with http upgrade`,
|
||||
);
|
||||
}
|
||||
proxy.name = proxy.name.replace(/=|,/g, '');
|
||||
if (proxy.ports) {
|
||||
proxy.ports = String(proxy.ports);
|
||||
|
||||
Reference in new issue
Block a user