mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-03 18:53:59 +08:00
feat: Loon 输入输出正式支持 VLESS XTLS/REALITY, VMess REALITY
This commit is contained in:
parent
a262dfbbe8
commit
b60995f7ac
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.19.23",
|
||||
"version": "2.19.24",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -151,7 +151,7 @@ function shadowsocks(proxy) {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
function shadowsocksr(proxy, includeUnsupportedProxy) {
|
||||
function shadowsocksr(proxy) {
|
||||
const result = new Result(proxy);
|
||||
result.append(
|
||||
`${proxy.name}=shadowsocksr,${proxy.server},${proxy.port},${proxy.cipher},"${proxy.password}"`,
|
||||
@ -290,17 +290,9 @@ function trojan(proxy) {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
function vmess(proxy, includeUnsupportedProxy) {
|
||||
if (!includeUnsupportedProxy && proxy['reality-opts']) {
|
||||
throw new Error(`VMess REALITY is not supported`);
|
||||
}
|
||||
function vmess(proxy) {
|
||||
const isReality = !!proxy['reality-opts'];
|
||||
|
||||
let isReality = false;
|
||||
if (includeUnsupportedProxy) {
|
||||
if (proxy['reality-opts']) {
|
||||
isReality = true;
|
||||
}
|
||||
}
|
||||
const result = new Result(proxy);
|
||||
result.append(
|
||||
`${proxy.name}=vmess,${proxy.server},${proxy.port},${proxy.cipher},"${proxy.uuid}"`,
|
||||
@ -397,28 +389,18 @@ function vmess(proxy, includeUnsupportedProxy) {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
function vless(proxy, includeUnsupportedProxy) {
|
||||
if (
|
||||
!includeUnsupportedProxy &&
|
||||
(typeof proxy.flow !== 'undefined' || proxy['reality-opts'])
|
||||
) {
|
||||
throw new Error(`VLESS XTLS/REALITY is not supported`);
|
||||
}
|
||||
function vless(proxy) {
|
||||
let isXtls = false;
|
||||
let isReality = false;
|
||||
if (includeUnsupportedProxy) {
|
||||
if (proxy['reality-opts']) {
|
||||
isReality = true;
|
||||
}
|
||||
const isReality = !!proxy['reality-opts'];
|
||||
|
||||
if (typeof proxy.flow !== 'undefined') {
|
||||
if (['xtls-rprx-vision'].includes(proxy.flow)) {
|
||||
isXtls = true;
|
||||
} else {
|
||||
throw new Error(`VLESS flow(${proxy.flow}) is not supported`);
|
||||
}
|
||||
if (typeof proxy.flow !== 'undefined') {
|
||||
if (['xtls-rprx-vision'].includes(proxy.flow)) {
|
||||
isXtls = true;
|
||||
} else {
|
||||
throw new Error(`VLESS flow(${proxy.flow}) is not supported`);
|
||||
}
|
||||
}
|
||||
|
||||
const result = new Result(proxy);
|
||||
result.append(
|
||||
`${proxy.name}=vless,${proxy.server},${proxy.port},"${proxy.uuid}"`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user