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