mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28b233b62c | ||
|
|
44d72523ce | ||
|
|
b60995f7ac |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.19.23",
|
||||
"version": "2.19.26",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -744,6 +744,8 @@ function URI_AnyTLS() {
|
||||
proxy[key] = value ? value.split(',') : undefined;
|
||||
} else if (['insecure'].includes(key)) {
|
||||
proxy['skip-cert-verify'] = /(TRUE)|1/i.test(value);
|
||||
} else if (['udp'].includes(key)) {
|
||||
proxy[key] = /(TRUE)|1/i.test(value);
|
||||
} else {
|
||||
proxy[key] = value;
|
||||
}
|
||||
|
||||
@@ -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}"`,
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function URI_Producer() {
|
||||
delete proxy.resolved;
|
||||
delete proxy['no-resolve'];
|
||||
for (const key in proxy) {
|
||||
if (proxy[key] == null || /^_/i.test(key)) {
|
||||
if (proxy[key] == null) {
|
||||
delete proxy[key];
|
||||
}
|
||||
}
|
||||
@@ -589,6 +589,10 @@ export default function URI_Producer() {
|
||||
if (proxy[key]) {
|
||||
anytlsParams.push(`insecure=1`);
|
||||
}
|
||||
} else if (['udp'].includes(key)) {
|
||||
if (proxy[key]) {
|
||||
anytlsParams.push(`udp=1`);
|
||||
}
|
||||
} else if (proxy[key]) {
|
||||
anytlsParams.push(
|
||||
`${i.replace(/-/g, '_')}=${encodeURIComponent(
|
||||
|
||||
Reference in New Issue
Block a user