Compare commits

..

1 Commits

6 changed files with 9 additions and 105 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.17.2",
"version": "2.16.64",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {

View File

@@ -185,7 +185,6 @@ async function processFn(
}
} else {
script = content;
$arguments = item.args.arguments || {};
}
}

View File

@@ -699,52 +699,6 @@ function URI_VLESS() {
};
return { name, test, parse };
}
function URI_AnyTLS() {
const name = 'URI AnyTLS Parser';
const test = (line) => {
return /^anytls:\/\//.test(line);
};
const parse = (line) => {
line = line.split(/anytls:\/\//)[1];
// eslint-disable-next-line no-unused-vars
let [__, password, server, port, addons = '', name] =
/^(.*?)@(.*?)(?::(\d+))?\/?(?:\?(.*?))?(?:#(.*?))?$/.exec(line);
password = decodeURIComponent(password);
port = parseInt(`${port}`, 10);
if (isNaN(port)) {
port = 443;
}
password = decodeURIComponent(password);
if (name != null) {
name = decodeURIComponent(name);
}
name = name ?? `AnyTLS ${server}:${port}`;
const proxy = {
type: 'anytls',
name,
server,
port,
password,
};
for (const addon of addons.split('&')) {
let [key, value] = addon.split('=');
key = key.replace(/_/g, '-');
value = decodeURIComponent(value);
if (['alpn'].includes(key)) {
proxy[key] = value ? value.split(',') : undefined;
} else if (['insecure'].includes(key)) {
proxy['skip-cert-verify'] = /(TRUE)|1/i.test(value);
} else {
proxy[key] = value;
}
}
return proxy;
};
return { name, test, parse };
}
function URI_Hysteria2() {
const name = 'URI Hysteria2 Parser';
const test = (line) => {
@@ -1590,7 +1544,6 @@ export default [
URI_Hysteria(),
URI_Hysteria2(),
URI_Trojan(),
URI_AnyTLS(),
Clash_All(),
Surge_Direct(),
Surge_SSH(),

View File

@@ -854,7 +854,7 @@ function RegionFilter(input) {
if (!Array.isArray(regions)) {
regions = [];
}
const keep = input?.keep ?? true;
const keep = input?.keep || true;
const REGION_MAP = {
HK: '🇭🇰',
TW: '🇹🇼',
@@ -909,7 +909,7 @@ function TypeFilter(input) {
if (!Array.isArray(types)) {
types = [];
}
const keep = input?.keep ?? true;
const keep = input?.keep || true;
return {
name: 'Type Filter',
func: (proxies) => {

View File

@@ -123,10 +123,10 @@ export default function Egern_Producer() {
proxy.udp || proxy.udp_relay || proxy.udp_relay,
next_hop: proxy.next_hop,
};
if (original.plugin === 'obfs') {
proxy.obfs = original['plugin-opts'].mode;
proxy.obfs_host = original['plugin-opts'].host;
proxy.obfs_uri = original['plugin-opts'].path;
if (proxy.plugin === 'obfs') {
proxy.obfs = proxy['plugin-opts'].mode;
proxy.obfs_host = proxy['plugin-opts'].host;
proxy.obfs_uri = proxy['plugin-opts'].path;
}
} else if (proxy.type === 'hysteria2') {
proxy = {
@@ -144,12 +144,9 @@ export default function Egern_Producer() {
port_hopping: proxy.ports,
port_hopping_interval: proxy['hop-interval'],
};
if (
original['obfs-password'] &&
original.obfs == 'salamander'
) {
if (proxy['obfs-password'] && proxy.obfs == 'salamander') {
proxy.obfs = 'salamander';
proxy.obfs_password = original['obfs-password'];
proxy.obfs_password = proxy['obfs-password'];
}
} else if (proxy.type === 'tuic') {
proxy = {

View File

@@ -493,7 +493,6 @@ export default function URI_Producer() {
'password',
'server',
'port',
'tls',
].includes(key)
) {
const i = key.replace(/-/, '_');
@@ -543,50 +542,6 @@ export default function URI_Producer() {
)}`;
}
break;
case 'anytls':
let anytlsParams = [];
Object.keys(proxy).forEach((key) => {
if (
![
'name',
'type',
'password',
'server',
'port',
'tls',
].includes(key)
) {
const i = key.replace(/-/, '_');
if (['alpn'].includes(key)) {
if (proxy[key]) {
anytlsParams.push(
`${i}=${encodeURIComponent(
Array.isArray(proxy[key])
? proxy[key][0]
: proxy[key],
)}`,
);
}
} else if (['skip-cert-verify'].includes(key)) {
if (proxy[key]) {
anytlsParams.push(`insecure=1`);
}
} else if (proxy[key]) {
anytlsParams.push(
`${i.replace(/-/g, '_')}=${encodeURIComponent(
proxy[key],
)}`,
);
}
}
});
result = `anytls://${encodeURIComponent(proxy.password)}@${
proxy.server
}:${proxy.port}/?${anytlsParams.join('&')}#${encodeURIComponent(
proxy.name,
)}`;
break;
case 'wireguard':
let wireguardParams = [];