mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-11-27 23:13:43 +00:00
feat: 过滤不支持的 VLESS encryption
This commit is contained in:
7 files changed
+14
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.20.62",
|
||||
"version": "2.20.63",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -292,6 +292,8 @@ export default function Egern_Producer() {
|
||||
// skip_tls_verify: proxy['skip-cert-verify'],
|
||||
};
|
||||
} else if (proxy.type === 'vless') {
|
||||
if (proxy.encryption)
|
||||
throw new Error(`VLESS encryption is not supported`);
|
||||
if (proxy.network === 'ws') {
|
||||
proxy.transport = {
|
||||
[proxy.tls ? 'wss' : 'ws']: {
|
||||
|
||||
@@ -398,6 +398,7 @@ function vmess(proxy) {
|
||||
}
|
||||
|
||||
function vless(proxy) {
|
||||
if (proxy.encryption) throw new Error(`VLESS encryption is not supported`);
|
||||
let isXtls = false;
|
||||
const isReality = !!proxy['reality-opts'];
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ export default function QX_Producer() {
|
||||
};
|
||||
return {
|
||||
produce: (proxy, type, opts = {}) => {
|
||||
console.log(opts);
|
||||
let result = produce(proxy, type, opts);
|
||||
if (opts['include-unsupported-proxy']) {
|
||||
if (proxy.flow && proxy.flow !== 'xtls-rprx-vision') {
|
||||
@@ -402,6 +401,7 @@ function vmess(proxy) {
|
||||
return result.toString();
|
||||
}
|
||||
function vless(proxy) {
|
||||
if (proxy.encryption) throw new Error(`VLESS encryption is not supported`);
|
||||
const result = new Result(proxy);
|
||||
const append = result.append.bind(result);
|
||||
const appendIfPresent = result.appendIfPresent.bind(result);
|
||||
|
||||
@@ -11,6 +11,8 @@ export default function Shadowrocket_Producer() {
|
||||
return false;
|
||||
} else if (['mieru', 'sudoku', 'naive'].includes(proxy.type)) {
|
||||
return false;
|
||||
} else if (proxy.encryption && ['vless'].includes(proxy.type)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
|
||||
@@ -978,6 +978,11 @@ export default function singbox_Producer() {
|
||||
}
|
||||
break;
|
||||
case 'vless':
|
||||
if (proxy.encryption) {
|
||||
throw new Error(
|
||||
`VLESS encryption is not supported`,
|
||||
);
|
||||
}
|
||||
if (
|
||||
!proxy.flow ||
|
||||
['xtls-rprx-vision'].includes(proxy.flow)
|
||||
|
||||
@@ -70,6 +70,8 @@ export default function Stash_Producer() {
|
||||
return false;
|
||||
} else if (['xhttp'].includes(proxy.network)) {
|
||||
return false;
|
||||
} else if (proxy.encryption && ['vless'].includes(proxy.type)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user