mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cbbd0e86f | ||
|
|
0320a77451 | ||
|
|
afb9296158 | ||
|
|
9b0c15ebc2 | ||
|
|
46738d5947 | ||
|
|
1f505752ae | ||
|
|
0734a3d563 | ||
|
|
497bc264e3 | ||
|
|
feb207b333 | ||
|
|
9ac1112b37 | ||
|
|
96769598ef | ||
|
|
f8ed6a3342 | ||
|
|
99b19c410d | ||
|
|
9e54507bbb | ||
|
|
20afa0ad22 | ||
|
|
c5b6960b35 | ||
|
|
4dd86cb368 | ||
|
|
4a0319e95f | ||
|
|
090d8a978f | ||
|
|
bc9fae6062 | ||
|
|
048344268c | ||
|
|
c5746f6a6b | ||
|
|
5cb226da62 | ||
|
|
d229047744 | ||
|
|
cb21a8e6ec | ||
|
|
537a00e8a9 | ||
|
|
b770578cba | ||
|
|
47a95e5a3d | ||
|
|
e99f13d487 | ||
|
|
fcab8401e0 |
@@ -91,4 +91,4 @@ This project is under the GPL V3 LICENSE.
|
|||||||
## Acknowledgements
|
## Acknowledgements
|
||||||
|
|
||||||
- Special thanks to @KOP-XIAO for his awesome resource-parser. Please give a [star](https://github.com/KOP-XIAO/QuantumultX) for his great work!
|
- Special thanks to @KOP-XIAO for his awesome resource-parser. Please give a [star](https://github.com/KOP-XIAO/QuantumultX) for his great work!
|
||||||
- Speicial thanks to @Orz-3 and @58xinian for their awesome icons.
|
- Special thanks to @Orz-3 and @58xinian for their awesome icons.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.3",
|
"version": "2.14.26",
|
||||||
"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": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import download from '@/utils/download';
|
import download from '@/utils/download';
|
||||||
|
import { isIPv4, isIPv6 } from '@/utils';
|
||||||
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
||||||
import PROXY_PREPROCESSORS from './preprocessors';
|
import PROXY_PREPROCESSORS from './preprocessors';
|
||||||
import PROXY_PRODUCERS from './producers';
|
import PROXY_PRODUCERS from './producers';
|
||||||
@@ -36,7 +36,7 @@ function parse(raw) {
|
|||||||
if (lastParser) {
|
if (lastParser) {
|
||||||
const [proxy, error] = tryParse(lastParser, line);
|
const [proxy, error] = tryParse(lastParser, line);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
proxies.push(proxy);
|
proxies.push(lastParse(proxy));
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ function parse(raw) {
|
|||||||
for (const parser of PROXY_PARSERS) {
|
for (const parser of PROXY_PARSERS) {
|
||||||
const [proxy, error] = tryParse(parser, line);
|
const [proxy, error] = tryParse(parser, line);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
proxies.push(proxy);
|
proxies.push(lastParse(proxy));
|
||||||
lastParser = parser;
|
lastParser = parser;
|
||||||
success = true;
|
success = true;
|
||||||
$.info(`${parser.name} is activated`);
|
$.info(`${parser.name} is activated`);
|
||||||
@@ -182,3 +182,31 @@ function safeMatch(parser, line) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function lastParse(proxy) {
|
||||||
|
if (proxy.type === 'trojan') {
|
||||||
|
if (proxy.network === 'tcp') {
|
||||||
|
delete proxy.network;
|
||||||
|
}
|
||||||
|
proxy.tls = true;
|
||||||
|
}
|
||||||
|
if (proxy.tls && !proxy.sni) {
|
||||||
|
if (proxy.network) {
|
||||||
|
let transportHost = proxy[`${proxy.network}-opts`]?.headers?.Host;
|
||||||
|
transportHost = Array.isArray(transportHost)
|
||||||
|
? transportHost[0]
|
||||||
|
: transportHost;
|
||||||
|
if (transportHost) {
|
||||||
|
proxy.sni = transportHost;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!proxy.sni && !isIP(proxy.server)) {
|
||||||
|
proxy.sni = proxy.server;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return proxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isIP(ip) {
|
||||||
|
return isIPv4(ip) || isIPv6(ip);
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,12 +23,19 @@ function URI_SS() {
|
|||||||
};
|
};
|
||||||
content = content.split('#')[0]; // strip proxy name
|
content = content.split('#')[0]; // strip proxy name
|
||||||
// handle IPV4 and IPV6
|
// handle IPV4 and IPV6
|
||||||
const serverAndPort = content.match(/@([^/]*)(\/|$)/)[1];
|
let serverAndPortArray = content.match(/@([^/]*)(\/|$)/);
|
||||||
|
let userInfoStr = Base64.decode(content.split('@')[0]);
|
||||||
|
if (!serverAndPortArray) {
|
||||||
|
content = Base64.decode(content);
|
||||||
|
userInfoStr = content.split('@')[0];
|
||||||
|
serverAndPortArray = content.match(/@([^/]*)(\/|$)/);
|
||||||
|
}
|
||||||
|
const serverAndPort = serverAndPortArray[1];
|
||||||
const portIdx = serverAndPort.lastIndexOf(':');
|
const portIdx = serverAndPort.lastIndexOf(':');
|
||||||
proxy.server = serverAndPort.substring(0, portIdx);
|
proxy.server = serverAndPort.substring(0, portIdx);
|
||||||
proxy.port = serverAndPort.substring(portIdx + 1);
|
proxy.port = serverAndPort.substring(portIdx + 1);
|
||||||
|
|
||||||
const userInfo = Base64.decode(content.split('@')[0]).split(':');
|
const userInfo = userInfoStr.split(':');
|
||||||
proxy.cipher = userInfo[0];
|
proxy.cipher = userInfo[0];
|
||||||
proxy.password = userInfo[1];
|
proxy.password = userInfo[1];
|
||||||
|
|
||||||
@@ -150,7 +157,7 @@ function URI_VMess() {
|
|||||||
};
|
};
|
||||||
const parse = (line) => {
|
const parse = (line) => {
|
||||||
line = line.split('vmess://')[1];
|
line = line.split('vmess://')[1];
|
||||||
const content = Base64.decode(line);
|
let content = Base64.decode(line);
|
||||||
if (/=\s*vmess/.test(content)) {
|
if (/=\s*vmess/.test(content)) {
|
||||||
// Quantumult VMess URI format
|
// Quantumult VMess URI format
|
||||||
const partitions = content.split(',').map((p) => p.trim());
|
const partitions = content.split(',').map((p) => p.trim());
|
||||||
@@ -202,30 +209,95 @@ function URI_VMess() {
|
|||||||
}
|
}
|
||||||
return proxy;
|
return proxy;
|
||||||
} else {
|
} else {
|
||||||
// V2rayN URI format
|
let params = {};
|
||||||
const params = JSON.parse(content);
|
|
||||||
|
try {
|
||||||
|
// V2rayN URI format
|
||||||
|
params = JSON.parse(content);
|
||||||
|
} catch (e) {
|
||||||
|
// console.error(e);
|
||||||
|
// Shadowrocket URI format
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
let [__, base64Line, qs] = /(^[^?]+?)\/?\?(.*)$/.exec(line);
|
||||||
|
content = Base64.decode(base64Line);
|
||||||
|
|
||||||
|
for (const addon of qs.split('&')) {
|
||||||
|
const [key, valueRaw] = addon.split('=');
|
||||||
|
let value = valueRaw;
|
||||||
|
value = decodeURIComponent(valueRaw);
|
||||||
|
if (value.indexOf(',') === -1) {
|
||||||
|
params[key] = value;
|
||||||
|
} else {
|
||||||
|
params[key] = value.split(',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
let [___, cipher, uuid, server, port] =
|
||||||
|
/(^[^:]+?):([^:]+?)@(.*):(\d+)$/.exec(content);
|
||||||
|
|
||||||
|
params.scy = cipher;
|
||||||
|
params.id = uuid;
|
||||||
|
params.port = port;
|
||||||
|
params.add = server;
|
||||||
|
}
|
||||||
const proxy = {
|
const proxy = {
|
||||||
name: params.ps,
|
name: params.ps ?? params.remark,
|
||||||
type: 'vmess',
|
type: 'vmess',
|
||||||
server: params.add,
|
server: params.add,
|
||||||
port: params.port,
|
port: parseInt(getIfPresent(params.port), 10),
|
||||||
cipher: 'auto', // V2rayN has no default cipher! use aes-128-gcm as default.
|
cipher: getIfPresent(params.scy, 'auto'),
|
||||||
uuid: params.id,
|
uuid: params.id,
|
||||||
alterId: getIfPresent(params.aid, 0),
|
alterId: parseInt(
|
||||||
tls: params.tls === 'tls' || params.tls === true,
|
getIfPresent(params.aid ?? params.alterId, 0),
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
tls: ['tls', true, 1, '1'].includes(params.tls),
|
||||||
'skip-cert-verify': isPresent(params.verify_cert)
|
'skip-cert-verify': isPresent(params.verify_cert)
|
||||||
? !params.verify_cert
|
? !params.verify_cert
|
||||||
: undefined,
|
: undefined,
|
||||||
};
|
};
|
||||||
|
// https://github.com/2dust/v2rayN/wiki/%E5%88%86%E4%BA%AB%E9%93%BE%E6%8E%A5%E6%A0%BC%E5%BC%8F%E8%AF%B4%E6%98%8E(ver-2)
|
||||||
|
if (proxy.tls && proxy.sni) {
|
||||||
|
proxy.sni = params.sni;
|
||||||
|
}
|
||||||
// handle obfs
|
// handle obfs
|
||||||
if (params.net === 'ws') {
|
if (params.net === 'ws' || params.obfs === 'websocket') {
|
||||||
proxy.network = 'ws';
|
proxy.network = 'ws';
|
||||||
proxy['ws-opts'] = {
|
} else if (
|
||||||
path: getIfNotBlank(params.path),
|
['tcp', 'http'].includes(params.net) ||
|
||||||
headers: { Host: getIfNotBlank(params.host) },
|
params.obfs === 'http'
|
||||||
};
|
) {
|
||||||
if (proxy.tls && params.host) {
|
proxy.network = 'http';
|
||||||
proxy.sni = params.host;
|
}
|
||||||
|
if (proxy.network) {
|
||||||
|
let transportHost = params.host ?? params.obfsParam;
|
||||||
|
let transportPath = params.path;
|
||||||
|
|
||||||
|
if (proxy.network === 'http') {
|
||||||
|
if (transportHost) {
|
||||||
|
transportHost = Array.isArray(transportHost)
|
||||||
|
? transportHost[0]
|
||||||
|
: transportHost;
|
||||||
|
}
|
||||||
|
if (transportPath) {
|
||||||
|
transportPath = Array.isArray(transportPath)
|
||||||
|
? transportPath[0]
|
||||||
|
: transportPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (transportPath || transportHost) {
|
||||||
|
proxy[`${proxy.network}-opts`] = {
|
||||||
|
path: getIfNotBlank(transportPath),
|
||||||
|
headers: { Host: getIfNotBlank(transportHost) },
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
delete proxy.network;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/docs/config.yaml#L413
|
||||||
|
// sni 优先级应高于 host
|
||||||
|
if (proxy.tls && !proxy.sni && transportHost) {
|
||||||
|
proxy.sni = transportHost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return proxy;
|
return proxy;
|
||||||
@@ -270,6 +342,8 @@ function Clash_All() {
|
|||||||
'http',
|
'http',
|
||||||
'snell',
|
'snell',
|
||||||
'trojan',
|
'trojan',
|
||||||
|
'tuic',
|
||||||
|
'vless',
|
||||||
].includes(proxy.type)
|
].includes(proxy.type)
|
||||||
) {
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
@@ -278,9 +352,19 @@ function Clash_All() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// handle vmess sni
|
// handle vmess sni
|
||||||
if (proxy.type === 'vmess') {
|
if (['vmess', 'vless'].includes(proxy.type)) {
|
||||||
proxy.sni = proxy.servername;
|
proxy.sni = proxy.servername;
|
||||||
delete proxy.servername;
|
delete proxy.servername;
|
||||||
|
if (proxy.tls && !proxy.sni) {
|
||||||
|
if (proxy.network === 'ws') {
|
||||||
|
proxy.sni = proxy['ws-opts']?.headers?.Host;
|
||||||
|
} else if (proxy.network === 'http') {
|
||||||
|
let httpHost = proxy['http-opts']?.headers?.Host;
|
||||||
|
proxy.sni = Array.isArray(httpHost)
|
||||||
|
? httpHost[0]
|
||||||
|
: httpHost;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return proxy;
|
return proxy;
|
||||||
@@ -474,6 +558,15 @@ function Surge_Snell() {
|
|||||||
return { name, test, parse };
|
return { name, test, parse };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Surge_Tuic() {
|
||||||
|
const name = 'Surge Tuic Parser';
|
||||||
|
const test = (line) => {
|
||||||
|
return /^.*=\s*tuic(-v5)??/.test(line.split(',')[0]);
|
||||||
|
};
|
||||||
|
const parse = (line) => getSurgeParser().parse(line);
|
||||||
|
return { name, test, parse };
|
||||||
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
URI_SS(),
|
URI_SS(),
|
||||||
URI_SSR(),
|
URI_SSR(),
|
||||||
@@ -485,6 +578,7 @@ export default [
|
|||||||
Surge_Trojan(),
|
Surge_Trojan(),
|
||||||
Surge_Http(),
|
Surge_Http(),
|
||||||
Surge_Snell(),
|
Surge_Snell(),
|
||||||
|
Surge_Tuic(),
|
||||||
Surge_Socks5(),
|
Surge_Socks5(),
|
||||||
Loon_SS(),
|
Loon_SS(),
|
||||||
Loon_SSR(),
|
Loon_SSR(),
|
||||||
|
|||||||
@@ -25,11 +25,14 @@ const grammars = String.raw`
|
|||||||
proxy.network = "ws";
|
proxy.network = "ws";
|
||||||
$set(proxy, "ws-opts.path", obfs.path);
|
$set(proxy, "ws-opts.path", obfs.path);
|
||||||
$set(proxy, "ws-opts.headers", obfs['ws-headers']);
|
$set(proxy, "ws-opts.headers", obfs['ws-headers']);
|
||||||
|
if (proxy['ws-opts'] && proxy['ws-opts']['headers'] && proxy['ws-opts']['headers'].Host) {
|
||||||
|
proxy['ws-opts']['headers'].Host = proxy['ws-opts']['headers'].Host.replace(/^"(.*)"$/, '$1')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
start = (shadowsocks/vmess/trojan/https/http/snell/socks5/socks5_tls) {
|
start = (shadowsocks/vmess/trojan/https/http/snell/socks5/socks5_tls/tuic/tuic_v5) {
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +76,13 @@ snell = tag equals "snell" address (snell_version/snell_psk/obfs/obfs_host/obfs_
|
|||||||
$set(proxy, "obfs-opts.path", obfs.path);
|
$set(proxy, "obfs-opts.path", obfs.path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tuic = tag equals "tuic" address (alpn/token/ip_version/tls_verification/sni/fast_open/tfo/others)* {
|
||||||
|
proxy.type = "tuic";
|
||||||
|
}
|
||||||
|
tuic_v5 = tag equals "tuic-v5" address (alpn/passwordk/uuidk/ip_version/tls_verification/sni/fast_open/tfo/others)* {
|
||||||
|
proxy.type = "tuic";
|
||||||
|
proxy.version = 5;
|
||||||
|
}
|
||||||
socks5 = tag equals "socks5" address (username password)? (fast_open/others)* {
|
socks5 = tag equals "socks5" address (username password)? (fast_open/others)* {
|
||||||
proxy.type = "socks5";
|
proxy.type = "socks5";
|
||||||
}
|
}
|
||||||
@@ -175,6 +185,11 @@ uri = $[^,]+
|
|||||||
|
|
||||||
udp_relay = comma "udp" equals flag:bool { proxy.udp = flag; }
|
udp_relay = comma "udp" equals flag:bool { proxy.udp = flag; }
|
||||||
fast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }
|
fast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }
|
||||||
|
tfo = comma "tfo" equals flag:bool { proxy.tfo = flag; }
|
||||||
|
ip_version = comma "ip-version" equals match:[^,]+ { proxy["ip-version"] = match.join(""); }
|
||||||
|
token = comma "token" equals match:[^,]+ { proxy.token = match.join(""); }
|
||||||
|
alpn = comma "alpn" equals match:[^,]+ { proxy.alpn = match.join(""); }
|
||||||
|
uuidk = comma "uuid" equals match:[^,]+ { proxy.uuid = match.join(""); }
|
||||||
|
|
||||||
tag = match:[^=,]* { proxy.name = match.join("").trim(); }
|
tag = match:[^=,]* { proxy.name = match.join("").trim(); }
|
||||||
comma = _ "," _
|
comma = _ "," _
|
||||||
|
|||||||
@@ -23,11 +23,14 @@
|
|||||||
proxy.network = "ws";
|
proxy.network = "ws";
|
||||||
$set(proxy, "ws-opts.path", obfs.path);
|
$set(proxy, "ws-opts.path", obfs.path);
|
||||||
$set(proxy, "ws-opts.headers", obfs['ws-headers']);
|
$set(proxy, "ws-opts.headers", obfs['ws-headers']);
|
||||||
|
if (proxy['ws-opts'] && proxy['ws-opts']['headers'] && proxy['ws-opts']['headers'].Host) {
|
||||||
|
proxy['ws-opts']['headers'].Host = proxy['ws-opts']['headers'].Host.replace(/^"(.*)"$/, '$1')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
start = (shadowsocks/vmess/trojan/https/http/snell/socks5/socks5_tls) {
|
start = (shadowsocks/vmess/trojan/https/http/snell/socks5/socks5_tls/tuic/tuic_v5) {
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +74,13 @@ snell = tag equals "snell" address (snell_version/snell_psk/obfs/obfs_host/obfs_
|
|||||||
$set(proxy, "obfs-opts.path", obfs.path);
|
$set(proxy, "obfs-opts.path", obfs.path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tuic = tag equals "tuic" address (alpn/token/ip_version/tls_verification/sni/fast_open/tfo/others)* {
|
||||||
|
proxy.type = "tuic";
|
||||||
|
}
|
||||||
|
tuic_v5 = tag equals "tuic-v5" address (alpn/passwordk/uuidk/ip_version/tls_verification/sni/fast_open/tfo/others)* {
|
||||||
|
proxy.type = "tuic";
|
||||||
|
proxy.version = 5;
|
||||||
|
}
|
||||||
socks5 = tag equals "socks5" address (username password)? (fast_open/others)* {
|
socks5 = tag equals "socks5" address (username password)? (fast_open/others)* {
|
||||||
proxy.type = "socks5";
|
proxy.type = "socks5";
|
||||||
}
|
}
|
||||||
@@ -173,6 +183,11 @@ uri = $[^,]+
|
|||||||
|
|
||||||
udp_relay = comma "udp" equals flag:bool { proxy.udp = flag; }
|
udp_relay = comma "udp" equals flag:bool { proxy.udp = flag; }
|
||||||
fast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }
|
fast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }
|
||||||
|
tfo = comma "tfo" equals flag:bool { proxy.tfo = flag; }
|
||||||
|
ip_version = comma "ip-version" equals match:[^,]+ { proxy["ip-version"] = match.join(""); }
|
||||||
|
token = comma "token" equals match:[^,]+ { proxy.token = match.join(""); }
|
||||||
|
alpn = comma "alpn" equals match:[^,]+ { proxy.alpn = match.join(""); }
|
||||||
|
uuidk = comma "uuid" equals match:[^,]+ { proxy.uuid = match.join(""); }
|
||||||
|
|
||||||
tag = match:[^=,]* { proxy.name = match.join("").trim(); }
|
tag = match:[^=,]* { proxy.name = match.join("").trim(); }
|
||||||
comma = _ "," _
|
comma = _ "," _
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ port = digits:[0-9]+ {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
params = "?" head:param tail:("&"@param)* {
|
params = "/"? "?" head:param tail:("&"@param)* {
|
||||||
proxy["skip-cert-verify"] = toBool(params["allowInsecure"]);
|
proxy["skip-cert-verify"] = toBool(params["allowInsecure"]);
|
||||||
proxy.sni = params["sni"] || params["peer"];
|
proxy.sni = params["sni"] || params["peer"];
|
||||||
|
|
||||||
@@ -87,6 +87,16 @@ params = "?" head:param tail:("&"@param)* {
|
|||||||
proxy.network = "ws";
|
proxy.network = "ws";
|
||||||
$set(proxy, "ws-opts.path", params["wspath"]);
|
$set(proxy, "ws-opts.path", params["wspath"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params["type"]) {
|
||||||
|
proxy.network = params["type"]
|
||||||
|
if (params["path"]) {
|
||||||
|
$set(proxy, proxy.network+"-opts.path", decodeURIComponent(params["path"]));
|
||||||
|
}
|
||||||
|
if (params["host"]) {
|
||||||
|
$set(proxy, proxy.network+"-opts.headers.Host", decodeURIComponent(params["host"]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
proxy.udp = toBool(params["udp"]);
|
proxy.udp = toBool(params["udp"]);
|
||||||
proxy.tfo = toBool(params["tfo"]);
|
proxy.tfo = toBool(params["tfo"]);
|
||||||
@@ -94,7 +104,7 @@ params = "?" head:param tail:("&"@param)* {
|
|||||||
|
|
||||||
param = kv/single;
|
param = kv/single;
|
||||||
|
|
||||||
kv = key:$[a-z]i+ "=" value:$[^&#]i+ {
|
kv = key:$[a-z]i+ "=" value:$[^&#]i* {
|
||||||
params[key] = value;
|
params[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ port = digits:[0-9]+ {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
params = "?" head:param tail:("&"@param)* {
|
params = "/"? "?" head:param tail:("&"@param)* {
|
||||||
proxy["skip-cert-verify"] = toBool(params["allowInsecure"]);
|
proxy["skip-cert-verify"] = toBool(params["allowInsecure"]);
|
||||||
proxy.sni = params["sni"] || params["peer"];
|
proxy.sni = params["sni"] || params["peer"];
|
||||||
|
|
||||||
@@ -85,6 +85,16 @@ params = "?" head:param tail:("&"@param)* {
|
|||||||
proxy.network = "ws";
|
proxy.network = "ws";
|
||||||
$set(proxy, "ws-opts.path", params["wspath"]);
|
$set(proxy, "ws-opts.path", params["wspath"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params["type"]) {
|
||||||
|
proxy.network = params["type"]
|
||||||
|
if (params["path"]) {
|
||||||
|
$set(proxy, proxy.network+"-opts.path", decodeURIComponent(params["path"]));
|
||||||
|
}
|
||||||
|
if (params["host"]) {
|
||||||
|
$set(proxy, proxy.network+"-opts.headers.Host", decodeURIComponent(params["host"]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
proxy.udp = toBool(params["udp"]);
|
proxy.udp = toBool(params["udp"]);
|
||||||
proxy.tfo = toBool(params["tfo"]);
|
proxy.tfo = toBool(params["tfo"]);
|
||||||
@@ -92,7 +102,7 @@ params = "?" head:param tail:("&"@param)* {
|
|||||||
|
|
||||||
param = kv/single;
|
param = kv/single;
|
||||||
|
|
||||||
kv = key:$[a-z]i+ "=" value:$[^&#]i+ {
|
kv = key:$[a-z]i+ "=" value:$[^&#]i* {
|
||||||
params[key] = value;
|
params[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,27 @@ export default function Clash_Producer() {
|
|||||||
const type = 'ALL';
|
const type = 'ALL';
|
||||||
const produce = (proxies) => {
|
const produce = (proxies) => {
|
||||||
// filter unsupported proxies
|
// filter unsupported proxies
|
||||||
proxies = proxies.filter((proxy) =>
|
proxies = proxies.filter((proxy) => {
|
||||||
['ss', 'ssr', 'vmess', 'socks', 'http', 'snell', 'trojan'].includes(
|
if (
|
||||||
proxy.type,
|
![
|
||||||
),
|
'ss',
|
||||||
);
|
'ssr',
|
||||||
|
'vmess',
|
||||||
|
'socks',
|
||||||
|
'http',
|
||||||
|
'snell',
|
||||||
|
'trojan',
|
||||||
|
].includes(proxy.type)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
} else if (
|
||||||
|
proxy.type === 'snell' &&
|
||||||
|
String(proxy.version) === '4'
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
return (
|
return (
|
||||||
'proxies:\n' +
|
'proxies:\n' +
|
||||||
proxies
|
proxies
|
||||||
@@ -25,6 +41,38 @@ export default function Clash_Producer() {
|
|||||||
proxy.servername = proxy.sni;
|
proxy.servername = proxy.sni;
|
||||||
delete proxy.sni;
|
delete proxy.sni;
|
||||||
}
|
}
|
||||||
|
// https://dreamacro.github.io/clash/configuration/outbound.html#vmess
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'cipher') &&
|
||||||
|
![
|
||||||
|
'auto',
|
||||||
|
'aes-128-gcm',
|
||||||
|
'chacha20-poly1305',
|
||||||
|
'none',
|
||||||
|
].includes(proxy.cipher)
|
||||||
|
) {
|
||||||
|
proxy.cipher = 'auto';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
['vmess', 'vless'].includes(proxy.type) &&
|
||||||
|
proxy.network === 'http'
|
||||||
|
) {
|
||||||
|
let httpPath = proxy['http-opts']?.path;
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'http-opts.path') &&
|
||||||
|
!Array.isArray(httpPath)
|
||||||
|
) {
|
||||||
|
proxy['http-opts'].path = [httpPath];
|
||||||
|
}
|
||||||
|
let httpHost = proxy['http-opts']?.headers?.Host;
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'http-opts.headers.Host') &&
|
||||||
|
!Array.isArray(httpHost)
|
||||||
|
) {
|
||||||
|
proxy['http-opts'].headers.Host = [httpHost];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete proxy['tls-fingerprint'];
|
delete proxy['tls-fingerprint'];
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import Loon_Producer from './loon';
|
|||||||
import URI_Producer from './uri';
|
import URI_Producer from './uri';
|
||||||
import V2Ray_Producer from './v2ray';
|
import V2Ray_Producer from './v2ray';
|
||||||
import QX_Producer from './qx';
|
import QX_Producer from './qx';
|
||||||
|
import ShadowRocket_Producer from './shadowrocket';
|
||||||
|
|
||||||
function JSON_Producer() {
|
function JSON_Producer() {
|
||||||
const type = 'ALL';
|
const type = 'ALL';
|
||||||
@@ -21,4 +22,5 @@ export default {
|
|||||||
V2Ray: V2Ray_Producer(),
|
V2Ray: V2Ray_Producer(),
|
||||||
JSON: JSON_Producer(),
|
JSON: JSON_Producer(),
|
||||||
Stash: Stash_Producer(),
|
Stash: Stash_Producer(),
|
||||||
|
ShadowRocket: ShadowRocket_Producer(),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -127,9 +127,7 @@ function trojan(proxy) {
|
|||||||
function vmess(proxy) {
|
function vmess(proxy) {
|
||||||
const result = new Result(proxy);
|
const result = new Result(proxy);
|
||||||
result.append(
|
result.append(
|
||||||
`${proxy.name}=vmess,${proxy.server},${proxy.port},${
|
`${proxy.name}=vmess,${proxy.server},${proxy.port},${proxy.cipher},"${proxy.uuid}"`,
|
||||||
proxy.cipher === 'auto' ? 'none' : proxy.cipher
|
|
||||||
},"${proxy.uuid}"`,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// transport
|
// transport
|
||||||
@@ -146,12 +144,14 @@ function vmess(proxy) {
|
|||||||
);
|
);
|
||||||
} else if (proxy.network === 'http') {
|
} else if (proxy.network === 'http') {
|
||||||
result.append(`,transport=http`);
|
result.append(`,transport=http`);
|
||||||
|
let httpPath = proxy['http-opts']?.path;
|
||||||
|
let httpHost = proxy['http-opts']?.headers?.Host;
|
||||||
result.appendIfPresent(
|
result.appendIfPresent(
|
||||||
`,path=${proxy['http-opts'].path}`,
|
`,path=${Array.isArray(httpPath) ? httpPath[0] : httpPath}`,
|
||||||
'http-opts.path',
|
'http-opts.path',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(
|
result.appendIfPresent(
|
||||||
`,host=${proxy['http-opts'].headers.Host}`,
|
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
|
||||||
'http-opts.headers.Host',
|
'http-opts.headers.Host',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -189,6 +189,9 @@ function vmess(proxy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function vless(proxy) {
|
function vless(proxy) {
|
||||||
|
if (proxy['reality-opts']) {
|
||||||
|
throw new Error(`reality is unsupported`);
|
||||||
|
}
|
||||||
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}"`,
|
||||||
@@ -208,12 +211,14 @@ function vless(proxy) {
|
|||||||
);
|
);
|
||||||
} else if (proxy.network === 'http') {
|
} else if (proxy.network === 'http') {
|
||||||
result.append(`,transport=http`);
|
result.append(`,transport=http`);
|
||||||
|
let httpPath = proxy['http-opts']?.path;
|
||||||
|
let httpHost = proxy['http-opts']?.headers?.Host;
|
||||||
result.appendIfPresent(
|
result.appendIfPresent(
|
||||||
`,path=${proxy['http-opts'].path}`,
|
`,path=${Array.isArray(httpPath) ? httpPath[0] : httpPath}`,
|
||||||
'http-opts.path',
|
'http-opts.path',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(
|
result.appendIfPresent(
|
||||||
`,host=${proxy['http-opts'].headers.Host}`,
|
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
|
||||||
'http-opts.headers.Host',
|
'http-opts.headers.Host',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -62,18 +62,20 @@ function shadowsocks(proxy) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// tls fingerprint
|
if (needTls(proxy)) {
|
||||||
appendIfPresent(
|
// tls fingerprint
|
||||||
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
appendIfPresent(
|
||||||
'tls-fingerprint',
|
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
||||||
);
|
'tls-fingerprint',
|
||||||
|
);
|
||||||
|
|
||||||
// tls verification
|
// tls verification
|
||||||
appendIfPresent(
|
appendIfPresent(
|
||||||
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
||||||
'skip-cert-verify',
|
'skip-cert-verify',
|
||||||
);
|
);
|
||||||
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
||||||
|
}
|
||||||
|
|
||||||
// tfo
|
// tfo
|
||||||
appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
|
appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
|
||||||
@@ -150,18 +152,20 @@ function trojan(proxy) {
|
|||||||
append(`,over-tls=true`);
|
append(`,over-tls=true`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// tls fingerprint
|
if (needTls(proxy)) {
|
||||||
appendIfPresent(
|
// tls fingerprint
|
||||||
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
appendIfPresent(
|
||||||
'tls-fingerprint',
|
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
||||||
);
|
'tls-fingerprint',
|
||||||
|
);
|
||||||
|
|
||||||
// tls verification
|
// tls verification
|
||||||
appendIfPresent(
|
appendIfPresent(
|
||||||
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
||||||
'skip-cert-verify',
|
'skip-cert-verify',
|
||||||
);
|
);
|
||||||
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
||||||
|
}
|
||||||
|
|
||||||
// tfo
|
// tfo
|
||||||
appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
|
appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
|
||||||
@@ -206,12 +210,18 @@ function vmess(proxy) {
|
|||||||
} else {
|
} else {
|
||||||
throw new Error(`network ${proxy.network} is unsupported`);
|
throw new Error(`network ${proxy.network} is unsupported`);
|
||||||
}
|
}
|
||||||
|
let transportPath = proxy[`${proxy.network}-opts`]?.path;
|
||||||
|
let transportHost = proxy[`${proxy.network}-opts`]?.headers?.Host;
|
||||||
appendIfPresent(
|
appendIfPresent(
|
||||||
`,obfs-uri=${proxy[`${proxy.network}-opts`].path}`,
|
`,obfs-uri=${
|
||||||
|
Array.isArray(transportPath) ? transportPath[0] : transportPath
|
||||||
|
}`,
|
||||||
`${proxy.network}-opts.path`,
|
`${proxy.network}-opts.path`,
|
||||||
);
|
);
|
||||||
appendIfPresent(
|
appendIfPresent(
|
||||||
`,obfs-host=${proxy[`${proxy.network}-opts`].headers.Host}`,
|
`,obfs-host=${
|
||||||
|
Array.isArray(transportHost) ? transportHost[0] : transportHost
|
||||||
|
}`,
|
||||||
`${proxy.network}-opts.headers.Host`,
|
`${proxy.network}-opts.headers.Host`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -219,18 +229,20 @@ function vmess(proxy) {
|
|||||||
if (proxy.tls) append(`,obfs=over-tls`);
|
if (proxy.tls) append(`,obfs=over-tls`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// tls fingerprint
|
if (needTls(proxy)) {
|
||||||
appendIfPresent(
|
// tls fingerprint
|
||||||
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
appendIfPresent(
|
||||||
'tls-fingerprint',
|
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
||||||
);
|
'tls-fingerprint',
|
||||||
|
);
|
||||||
|
|
||||||
// tls verification
|
// tls verification
|
||||||
appendIfPresent(
|
appendIfPresent(
|
||||||
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
||||||
'skip-cert-verify',
|
'skip-cert-verify',
|
||||||
);
|
);
|
||||||
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
||||||
|
}
|
||||||
|
|
||||||
// AEAD
|
// AEAD
|
||||||
if (isPresent(proxy, 'aead')) {
|
if (isPresent(proxy, 'aead')) {
|
||||||
@@ -266,18 +278,20 @@ function http(proxy) {
|
|||||||
}
|
}
|
||||||
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
||||||
|
|
||||||
// tls fingerprint
|
if (needTls(proxy)) {
|
||||||
appendIfPresent(
|
// tls fingerprint
|
||||||
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
appendIfPresent(
|
||||||
'tls-fingerprint',
|
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
||||||
);
|
'tls-fingerprint',
|
||||||
|
);
|
||||||
|
|
||||||
// tls verification
|
// tls verification
|
||||||
appendIfPresent(
|
appendIfPresent(
|
||||||
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
||||||
'skip-cert-verify',
|
'skip-cert-verify',
|
||||||
);
|
);
|
||||||
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
||||||
|
}
|
||||||
|
|
||||||
// tfo
|
// tfo
|
||||||
appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
|
appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
|
||||||
@@ -306,18 +320,20 @@ function socks5(proxy) {
|
|||||||
}
|
}
|
||||||
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
||||||
|
|
||||||
// tls fingerprint
|
if (needTls(proxy)) {
|
||||||
appendIfPresent(
|
// tls fingerprint
|
||||||
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
appendIfPresent(
|
||||||
'tls-fingerprint',
|
`,tls-cert-sha256=${proxy['tls-fingerprint']}`,
|
||||||
);
|
'tls-fingerprint',
|
||||||
|
);
|
||||||
|
|
||||||
// tls verification
|
// tls verification
|
||||||
appendIfPresent(
|
appendIfPresent(
|
||||||
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
`,tls-verification=${!proxy['skip-cert-verify']}`,
|
||||||
'skip-cert-verify',
|
'skip-cert-verify',
|
||||||
);
|
);
|
||||||
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
appendIfPresent(`,tls-host=${proxy.sni}`, 'sni');
|
||||||
|
}
|
||||||
|
|
||||||
// tfo
|
// tfo
|
||||||
appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
|
appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
|
||||||
@@ -332,11 +348,5 @@ function socks5(proxy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function needTls(proxy) {
|
function needTls(proxy) {
|
||||||
return (
|
return proxy.tls;
|
||||||
proxy.tls ||
|
|
||||||
proxy.sni ||
|
|
||||||
typeof proxy['skip-cert-verify'] !== 'undefined' ||
|
|
||||||
typeof proxy['tls-fingerprint'] !== 'undefined' ||
|
|
||||||
typeof proxy['tls-host'] !== 'undefined'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
88
backend/src/core/proxy-utils/producers/shadowrocket.js
Normal file
88
backend/src/core/proxy-utils/producers/shadowrocket.js
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
import { isPresent } from '@/core/proxy-utils/producers/utils';
|
||||||
|
|
||||||
|
export default function Stash_Producer() {
|
||||||
|
const type = 'ALL';
|
||||||
|
const produce = (proxies) => {
|
||||||
|
return (
|
||||||
|
'proxies:\n' +
|
||||||
|
proxies
|
||||||
|
.filter((proxy) => {
|
||||||
|
if (
|
||||||
|
proxy.type === 'snell' &&
|
||||||
|
String(proxy.version) === '4'
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.map((proxy) => {
|
||||||
|
if (proxy.type === 'vmess') {
|
||||||
|
// handle vmess aead
|
||||||
|
if (isPresent(proxy, 'aead')) {
|
||||||
|
if (proxy.aead) {
|
||||||
|
proxy.alterId = 0;
|
||||||
|
}
|
||||||
|
delete proxy.aead;
|
||||||
|
}
|
||||||
|
if (isPresent(proxy, 'sni')) {
|
||||||
|
proxy.servername = proxy.sni;
|
||||||
|
delete proxy.sni;
|
||||||
|
}
|
||||||
|
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/docs/config.yaml#L400
|
||||||
|
// https://stash.wiki/proxy-protocols/proxy-types#vmess
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'cipher') &&
|
||||||
|
![
|
||||||
|
'auto',
|
||||||
|
'aes-128-gcm',
|
||||||
|
'chacha20-poly1305',
|
||||||
|
'none',
|
||||||
|
].includes(proxy.cipher)
|
||||||
|
) {
|
||||||
|
proxy.cipher = 'auto';
|
||||||
|
}
|
||||||
|
} else if (proxy.type === 'tuic') {
|
||||||
|
if (isPresent(proxy, 'alpn')) {
|
||||||
|
proxy.alpn = Array.isArray(proxy.alpn)
|
||||||
|
? proxy.alpn
|
||||||
|
: [proxy.alpn];
|
||||||
|
} else {
|
||||||
|
proxy.alpn = ['h3'];
|
||||||
|
}
|
||||||
|
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/adapter/outbound/tuic.go#L197
|
||||||
|
if (
|
||||||
|
(!proxy.token || proxy.token.length === 0) &&
|
||||||
|
!isPresent(proxy, 'version')
|
||||||
|
) {
|
||||||
|
proxy.version = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
['vmess', 'vless'].includes(proxy.type) &&
|
||||||
|
proxy.network === 'http'
|
||||||
|
) {
|
||||||
|
let httpPath = proxy['http-opts']?.path;
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'http-opts.path') &&
|
||||||
|
!Array.isArray(httpPath)
|
||||||
|
) {
|
||||||
|
proxy['http-opts'].path = [httpPath];
|
||||||
|
}
|
||||||
|
let httpHost = proxy['http-opts']?.headers?.Host;
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'http-opts.headers.Host') &&
|
||||||
|
!Array.isArray(httpHost)
|
||||||
|
) {
|
||||||
|
proxy['http-opts'].headers.Host = [httpHost];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete proxy['tls-fingerprint'];
|
||||||
|
return ' - ' + JSON.stringify(proxy) + '\n';
|
||||||
|
})
|
||||||
|
.join('')
|
||||||
|
);
|
||||||
|
};
|
||||||
|
return { type, produce };
|
||||||
|
}
|
||||||
@@ -6,6 +6,27 @@ export default function Stash_Producer() {
|
|||||||
return (
|
return (
|
||||||
'proxies:\n' +
|
'proxies:\n' +
|
||||||
proxies
|
proxies
|
||||||
|
.filter((proxy) => {
|
||||||
|
if (
|
||||||
|
![
|
||||||
|
'ss',
|
||||||
|
'ssr',
|
||||||
|
'vmess',
|
||||||
|
'socks',
|
||||||
|
'http',
|
||||||
|
'snell',
|
||||||
|
'trojan',
|
||||||
|
'tuic',
|
||||||
|
'vless',
|
||||||
|
].includes(proxy.type) ||
|
||||||
|
(proxy.type === 'snell' &&
|
||||||
|
String(proxy.version) === '4') ||
|
||||||
|
(proxy.type === 'vless' && proxy['reality-opts'])
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
})
|
||||||
.map((proxy) => {
|
.map((proxy) => {
|
||||||
if (proxy.type === 'vmess') {
|
if (proxy.type === 'vmess') {
|
||||||
// handle vmess aead
|
// handle vmess aead
|
||||||
@@ -19,6 +40,54 @@ export default function Stash_Producer() {
|
|||||||
proxy.servername = proxy.sni;
|
proxy.servername = proxy.sni;
|
||||||
delete proxy.sni;
|
delete proxy.sni;
|
||||||
}
|
}
|
||||||
|
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/docs/config.yaml#L400
|
||||||
|
// https://stash.wiki/proxy-protocols/proxy-types#vmess
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'cipher') &&
|
||||||
|
![
|
||||||
|
'auto',
|
||||||
|
'aes-128-gcm',
|
||||||
|
'chacha20-poly1305',
|
||||||
|
'none',
|
||||||
|
].includes(proxy.cipher)
|
||||||
|
) {
|
||||||
|
proxy.cipher = 'auto';
|
||||||
|
}
|
||||||
|
} else if (proxy.type === 'tuic') {
|
||||||
|
if (isPresent(proxy, 'alpn')) {
|
||||||
|
proxy.alpn = Array.isArray(proxy.alpn)
|
||||||
|
? proxy.alpn
|
||||||
|
: [proxy.alpn];
|
||||||
|
} else {
|
||||||
|
proxy.alpn = ['h3'];
|
||||||
|
}
|
||||||
|
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/adapter/outbound/tuic.go#L197
|
||||||
|
if (
|
||||||
|
(!proxy.token || proxy.token.length === 0) &&
|
||||||
|
!isPresent(proxy, 'version')
|
||||||
|
) {
|
||||||
|
proxy.version = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
['vmess', 'vless'].includes(proxy.type) &&
|
||||||
|
proxy.network === 'http'
|
||||||
|
) {
|
||||||
|
let httpPath = proxy['http-opts']?.path;
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'http-opts.path') &&
|
||||||
|
!Array.isArray(httpPath)
|
||||||
|
) {
|
||||||
|
proxy['http-opts'].path = [httpPath];
|
||||||
|
}
|
||||||
|
let httpHost = proxy['http-opts']?.headers?.Host;
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'http-opts.headers.Host') &&
|
||||||
|
!Array.isArray(httpHost)
|
||||||
|
) {
|
||||||
|
proxy['http-opts'].headers.Host = [httpHost];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete proxy['tls-fingerprint'];
|
delete proxy['tls-fingerprint'];
|
||||||
|
|||||||
@@ -4,6 +4,14 @@ import $ from '@/core/app';
|
|||||||
|
|
||||||
const targetPlatform = 'Surge';
|
const targetPlatform = 'Surge';
|
||||||
|
|
||||||
|
const ipVersions = {
|
||||||
|
dual: 'dual',
|
||||||
|
ipv4: 'v4-only',
|
||||||
|
ipv6: 'v6-only',
|
||||||
|
'ipv4-prefer': 'prefer-v4',
|
||||||
|
'ipv6-prefer': 'prefer-v6',
|
||||||
|
};
|
||||||
|
|
||||||
export default function Surge_Producer() {
|
export default function Surge_Producer() {
|
||||||
const produce = (proxy) => {
|
const produce = (proxy) => {
|
||||||
switch (proxy.type) {
|
switch (proxy.type) {
|
||||||
@@ -19,6 +27,8 @@ export default function Surge_Producer() {
|
|||||||
return socks5(proxy);
|
return socks5(proxy);
|
||||||
case 'snell':
|
case 'snell':
|
||||||
return snell(proxy);
|
return snell(proxy);
|
||||||
|
case 'tuic':
|
||||||
|
return tuic(proxy);
|
||||||
}
|
}
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Platform ${targetPlatform} does not support proxy type: ${proxy.type}`,
|
`Platform ${targetPlatform} does not support proxy type: ${proxy.type}`,
|
||||||
@@ -215,15 +225,15 @@ function snell(proxy) {
|
|||||||
|
|
||||||
// obfs
|
// obfs
|
||||||
result.appendIfPresent(
|
result.appendIfPresent(
|
||||||
`,obfs=${proxy['obfs-opts'].mode}`,
|
`,obfs=${proxy['obfs-opts']?.mode}`,
|
||||||
'obfs-opts.mode',
|
'obfs-opts.mode',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(
|
result.appendIfPresent(
|
||||||
`,obfs-host=${proxy['obfs-opts'].host}`,
|
`,obfs-host=${proxy['obfs-opts']?.host}`,
|
||||||
'obfs-opts.host',
|
'obfs-opts.host',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(
|
result.appendIfPresent(
|
||||||
`,obfs-uri=${proxy['obfs-opts'].path}`,
|
`,obfs-uri=${proxy['obfs-opts']?.path}`,
|
||||||
'obfs-opts.path',
|
'obfs-opts.path',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -233,6 +243,49 @@ function snell(proxy) {
|
|||||||
// test-url
|
// test-url
|
||||||
result.appendIfPresent(`,test-url=${proxy['test-url']}`, 'test-url');
|
result.appendIfPresent(`,test-url=${proxy['test-url']}`, 'test-url');
|
||||||
|
|
||||||
|
// reuse
|
||||||
|
result.appendIfPresent(`,reuse=${proxy['reuse']}`, 'reuse');
|
||||||
|
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
function tuic(proxy) {
|
||||||
|
const result = new Result(proxy);
|
||||||
|
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/adapter/outbound/tuic.go#L197
|
||||||
|
let type = proxy.type;
|
||||||
|
if (!proxy.token || proxy.token.length === 0) {
|
||||||
|
type = 'tuic-v5';
|
||||||
|
}
|
||||||
|
result.append(`${proxy.name}=${type},${proxy.server},${proxy.port}`);
|
||||||
|
|
||||||
|
result.appendIfPresent(`,uuid=${proxy.uuid}`, 'uuid');
|
||||||
|
result.appendIfPresent(`,password=${proxy.password}`, 'password');
|
||||||
|
result.appendIfPresent(`,token=${proxy.token}`, 'token');
|
||||||
|
|
||||||
|
result.appendIfPresent(
|
||||||
|
`,alpn=${Array.isArray(proxy.alpn) ? proxy.alpn[0] : proxy.alpn}`,
|
||||||
|
'alpn',
|
||||||
|
);
|
||||||
|
|
||||||
|
result.appendIfPresent(
|
||||||
|
`,ip-version=${ipVersions[proxy['ip-version']] || proxy['ip-version']}`,
|
||||||
|
'ip-version',
|
||||||
|
);
|
||||||
|
|
||||||
|
// tls verification
|
||||||
|
result.appendIfPresent(`,sni=${proxy.sni}`, 'sni');
|
||||||
|
result.appendIfPresent(
|
||||||
|
`,skip-cert-verify=${proxy['skip-cert-verify']}`,
|
||||||
|
'skip-cert-verify',
|
||||||
|
);
|
||||||
|
|
||||||
|
// tfo
|
||||||
|
result.appendIfPresent(`,tfo=${proxy['fast-open']}`, 'fast-open');
|
||||||
|
result.appendIfPresent(`,tfo=${proxy.tfo}`, 'tfo');
|
||||||
|
|
||||||
|
// test-url
|
||||||
|
result.appendIfPresent(`,test-url=${proxy['test-url']}`, 'test-url');
|
||||||
|
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +301,13 @@ function handleTransport(result, proxy) {
|
|||||||
if (isPresent(proxy, 'ws-opts.headers')) {
|
if (isPresent(proxy, 'ws-opts.headers')) {
|
||||||
const headers = proxy['ws-opts'].headers;
|
const headers = proxy['ws-opts'].headers;
|
||||||
const value = Object.keys(headers)
|
const value = Object.keys(headers)
|
||||||
.map((k) => `${k}:${headers[k]}`)
|
.map((k) => {
|
||||||
|
let v = headers[k];
|
||||||
|
if (['Host'].includes(k)) {
|
||||||
|
v = `"${v}"`;
|
||||||
|
}
|
||||||
|
return `${k}:${v}`;
|
||||||
|
})
|
||||||
.join('|');
|
.join('|');
|
||||||
if (isNotBlank(value)) {
|
if (isNotBlank(value)) {
|
||||||
result.append(`,ws-headers=${value}`);
|
result.append(`,ws-headers=${value}`);
|
||||||
|
|||||||
@@ -55,27 +55,73 @@ export default function URI_Producer() {
|
|||||||
break;
|
break;
|
||||||
case 'vmess':
|
case 'vmess':
|
||||||
// V2RayN URI format
|
// V2RayN URI format
|
||||||
|
let type = '';
|
||||||
|
let net = proxy.network || 'tcp';
|
||||||
|
if (proxy.network === 'http') {
|
||||||
|
net = 'tcp';
|
||||||
|
type = 'http';
|
||||||
|
}
|
||||||
result = {
|
result = {
|
||||||
|
v: '2',
|
||||||
ps: proxy.name,
|
ps: proxy.name,
|
||||||
add: proxy.server,
|
add: proxy.server,
|
||||||
port: proxy.port,
|
port: proxy.port,
|
||||||
id: proxy.uuid,
|
id: proxy.uuid,
|
||||||
type: '',
|
type,
|
||||||
aid: 0,
|
aid: 0,
|
||||||
net: proxy.network || 'tcp',
|
net,
|
||||||
tls: proxy.tls ? 'tls' : '',
|
tls: proxy.tls ? 'tls' : '',
|
||||||
};
|
};
|
||||||
|
if (proxy.tls && proxy.sni) {
|
||||||
|
result.sni = proxy.sni;
|
||||||
|
}
|
||||||
// obfs
|
// obfs
|
||||||
if (proxy.network === 'ws') {
|
if (proxy.network) {
|
||||||
result.path = proxy['ws-opts'].path || '/';
|
let vmessTransportPath =
|
||||||
result.host = proxy['ws-opts'].headers.Host || proxy.server;
|
proxy[`${proxy.network}-opts`]?.path;
|
||||||
|
let vmessTransportHost =
|
||||||
|
proxy[`${proxy.network}-opts`]?.headers?.Host;
|
||||||
|
if (vmessTransportPath) {
|
||||||
|
result.path = Array.isArray(vmessTransportPath)
|
||||||
|
? vmessTransportPath[0]
|
||||||
|
: vmessTransportPath;
|
||||||
|
}
|
||||||
|
if (vmessTransportHost) {
|
||||||
|
result.host = Array.isArray(vmessTransportHost)
|
||||||
|
? vmessTransportHost[0]
|
||||||
|
: vmessTransportHost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
result = 'vmess://' + Base64.encode(JSON.stringify(result));
|
result = 'vmess://' + Base64.encode(JSON.stringify(result));
|
||||||
break;
|
break;
|
||||||
case 'trojan':
|
case 'trojan':
|
||||||
|
let trojanTransport = '';
|
||||||
|
if (proxy.network) {
|
||||||
|
trojanTransport = `&type=${proxy.network}`;
|
||||||
|
let trojanTransportPath =
|
||||||
|
proxy[`${proxy.network}-opts`]?.path;
|
||||||
|
let trojanTransportHost =
|
||||||
|
proxy[`${proxy.network}-opts`]?.headers?.Host;
|
||||||
|
if (trojanTransportPath) {
|
||||||
|
trojanTransport += `&path=${encodeURIComponent(
|
||||||
|
Array.isArray(trojanTransportPath)
|
||||||
|
? trojanTransportPath[0]
|
||||||
|
: trojanTransportPath,
|
||||||
|
)}`;
|
||||||
|
}
|
||||||
|
if (trojanTransportHost) {
|
||||||
|
trojanTransport += `&host=${encodeURIComponent(
|
||||||
|
Array.isArray(trojanTransportHost)
|
||||||
|
? trojanTransportHost[0]
|
||||||
|
: trojanTransportHost,
|
||||||
|
)}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
result = `trojan://${proxy.password}@${proxy.server}:${
|
result = `trojan://${proxy.password}@${proxy.server}:${
|
||||||
proxy.port
|
proxy.port
|
||||||
}#${encodeURIComponent(proxy.name)}`;
|
}?sni=${encodeURIComponent(proxy.sni || proxy.server)}${
|
||||||
|
proxy['skip-cert-verify'] ? '&allowInsecure=1' : ''
|
||||||
|
}${trojanTransport}#${encodeURIComponent(proxy.name)}`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ export default function register($app) {
|
|||||||
if (!$.read(ARTIFACTS_KEY)) $.write({}, ARTIFACTS_KEY);
|
if (!$.read(ARTIFACTS_KEY)) $.write({}, ARTIFACTS_KEY);
|
||||||
|
|
||||||
// RESTful APIs
|
// RESTful APIs
|
||||||
$app.route('/api/artifacts').get(getAllArtifacts).post(createArtifact);
|
$app.route('/api/artifacts')
|
||||||
|
.get(getAllArtifacts)
|
||||||
|
.post(createArtifact)
|
||||||
|
.put(replaceArtifact);
|
||||||
|
|
||||||
$app.route('/api/artifact/:name')
|
$app.route('/api/artifact/:name')
|
||||||
.get(getArtifact)
|
.get(getArtifact)
|
||||||
@@ -32,6 +35,12 @@ function getAllArtifacts(req, res) {
|
|||||||
success(res, allArtifacts);
|
success(res, allArtifacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function replaceArtifact(req, res) {
|
||||||
|
const allArtifacts = req.body;
|
||||||
|
$.write(allArtifacts, ARTIFACTS_KEY);
|
||||||
|
success(res);
|
||||||
|
}
|
||||||
|
|
||||||
async function getArtifact(req, res) {
|
async function getArtifact(req, res) {
|
||||||
let { name } = req.params;
|
let { name } = req.params;
|
||||||
name = decodeURIComponent(name);
|
name = decodeURIComponent(name);
|
||||||
@@ -131,7 +140,7 @@ async function deleteArtifact(req, res) {
|
|||||||
files[encodeURIComponent(artifact.name)] = {
|
files[encodeURIComponent(artifact.name)] = {
|
||||||
content: '',
|
content: '',
|
||||||
};
|
};
|
||||||
// 当别的Sub 删了同步订阅 或 gist里面删了 当前设备没有删除 时 无法删除的bug
|
// 当别的Sub 删了同步订阅 或 gist里面删了 当前设备没有删除 时 无法删除的bug
|
||||||
try {
|
try {
|
||||||
await syncToGist(files);
|
await syncToGist(files);
|
||||||
} catch (i) {
|
} catch (i) {
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ export default function register($app) {
|
|||||||
|
|
||||||
$app.route('/api/collections')
|
$app.route('/api/collections')
|
||||||
.get(getAllCollections)
|
.get(getAllCollections)
|
||||||
.post(createCollection);
|
.post(createCollection)
|
||||||
|
.put(replaceCollection);
|
||||||
}
|
}
|
||||||
|
|
||||||
// collection API
|
// collection API
|
||||||
@@ -111,3 +112,9 @@ function getAllCollections(req, res) {
|
|||||||
const allCols = $.read(COLLECTIONS_KEY);
|
const allCols = $.read(COLLECTIONS_KEY);
|
||||||
success(res, allCols);
|
success(res, allCols);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function replaceCollection(req, res) {
|
||||||
|
const allCols = req.body;
|
||||||
|
$.write(allCols, COLLECTIONS_KEY);
|
||||||
|
success(res);
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ export default function register($app) {
|
|||||||
.patch(updateSubscription)
|
.patch(updateSubscription)
|
||||||
.delete(deleteSubscription);
|
.delete(deleteSubscription);
|
||||||
|
|
||||||
$app.route('/api/subs').get(getAllSubscriptions).post(createSubscription);
|
$app.route('/api/subs')
|
||||||
|
.get(getAllSubscriptions)
|
||||||
|
.post(createSubscription)
|
||||||
|
.put(replaceSubscriptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
// subscriptions API
|
// subscriptions API
|
||||||
@@ -66,10 +69,10 @@ async function getFlowInfo(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// unit is KB
|
// unit is KB
|
||||||
const uploadMatch = flowHeaders.match(/upload=(-?)(\d+)/)
|
const uploadMatch = flowHeaders.match(/upload=(-?)(\d+)/);
|
||||||
const upload = Number(uploadMatch[1] + uploadMatch[2]);
|
const upload = Number(uploadMatch[1] + uploadMatch[2]);
|
||||||
|
|
||||||
const downloadMatch = flowHeaders.match(/download=(-?)(\d+)/)
|
const downloadMatch = flowHeaders.match(/download=(-?)(\d+)/);
|
||||||
const download = Number(downloadMatch[1] + downloadMatch[2]);
|
const download = Number(downloadMatch[1] + downloadMatch[2]);
|
||||||
|
|
||||||
const total = Number(flowHeaders.match(/total=(\d+)/)[1]);
|
const total = Number(flowHeaders.match(/total=(\d+)/)[1]);
|
||||||
@@ -202,3 +205,9 @@ function getAllSubscriptions(req, res) {
|
|||||||
const allSubs = $.read(SUBS_KEY);
|
const allSubs = $.read(SUBS_KEY);
|
||||||
success(res, allSubs);
|
success(res, allSubs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function replaceSubscriptions(req, res) {
|
||||||
|
const allSubs = req.body;
|
||||||
|
$.write(allSubs, SUBS_KEY);
|
||||||
|
success(res);
|
||||||
|
}
|
||||||
|
|||||||
@@ -25,9 +25,6 @@ export default function register($app) {
|
|||||||
async function produceArtifact({ type, name, platform }) {
|
async function produceArtifact({ type, name, platform }) {
|
||||||
platform = platform || 'JSON';
|
platform = platform || 'JSON';
|
||||||
|
|
||||||
// produce Clash node format for ShadowRocket
|
|
||||||
if (platform === 'ShadowRocket') platform = 'Clash';
|
|
||||||
|
|
||||||
if (type === 'subscription') {
|
if (type === 'subscription') {
|
||||||
const allSubs = $.read(SUBS_KEY);
|
const allSubs = $.read(SUBS_KEY);
|
||||||
const sub = findByName(allSubs, name);
|
const sub = findByName(allSubs, name);
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ export function getFlag(name) {
|
|||||||
'🇲🇴': ['Macao', '澳门', '澳門', 'CTM'],
|
'🇲🇴': ['Macao', '澳门', '澳門', 'CTM'],
|
||||||
'🇲🇹': ['Malta', '马耳他'],
|
'🇲🇹': ['Malta', '马耳他'],
|
||||||
'🇲🇽': ['Mexico', '墨西哥'],
|
'🇲🇽': ['Mexico', '墨西哥'],
|
||||||
'🇲🇾': ['Malaysia', '马来西亚', '馬來西亞', '吉隆坡', '大馬'],
|
'🇲🇾': ['Malaysia', '马来', '馬來', '吉隆坡', '大馬'],
|
||||||
'🇳🇱': ['Netherlands', '荷兰', '荷蘭', '尼德蘭', '阿姆斯特丹'],
|
'🇳🇱': ['Netherlands', '荷兰', '荷蘭', '尼德蘭', '阿姆斯特丹'],
|
||||||
'🇳🇴': ['Norway', '挪威'],
|
'🇳🇴': ['Norway', '挪威'],
|
||||||
'🇳🇵': ['Nepal', '尼泊尔'],
|
'🇳🇵': ['Nepal', '尼泊尔'],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!name=Sub-Store
|
#!name=Sub-Store
|
||||||
#!desc=高级订阅管理工具 @Peng-YM 无 ability 参数版本,不会爆内存, 如果需要使用指定节点功能 例如[加国旗脚本或者cname脚本] 可以用原版
|
#!desc=高级订阅管理工具 @Peng-YM 无 ability 参数版本,不会爆内存, 如果需要使用指定节点功能 例如[加国旗脚本或者cname脚本] 可以用带 ability 参数
|
||||||
|
|
||||||
[MITM]
|
[MITM]
|
||||||
hostname = %APPEND% sub.store
|
hostname = %APPEND% sub.store
|
||||||
|
|||||||
11
config/Surge-ability.sgmodule
Normal file
11
config/Surge-ability.sgmodule
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!name=Sub-Store
|
||||||
|
#!desc=高级订阅管理工具 @Peng-YM 带 ability 参数版本, 可能会爆内存, 如果不需要使用指定节点功能 例如[加国旗脚本或者cname脚本] 可以用不带 ability 参数版本
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname = %APPEND% sub.store
|
||||||
|
|
||||||
|
[Script]
|
||||||
|
Sub-Store Core=type=http-request,pattern=^https?:\/\/sub\.store\/((download)|api\/(preview|sync|(utils\/node-info))),script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-1.min.js,requires-body=true,timeout=120,ability=http-client-policy
|
||||||
|
Sub-Store Simple=type=http-request,pattern=^https?:\/\/sub\.store,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-0.min.js,requires-body=true
|
||||||
|
|
||||||
|
Sub-Store Sync=type=cron,cronexp=0 0 * * *,wake-system=1,timeout=120,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/cron-sync-artifacts.min.js
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
#!name=Sub-Store
|
#!name=Sub-Store
|
||||||
#!desc=高级订阅管理工具 @Peng-YM
|
#!desc=高级订阅管理工具 @Peng-YM 无 ability 参数版本,不会爆内存, 如果需要使用指定节点功能 例如[加国旗脚本或者cname脚本] 可以用带 ability 参数
|
||||||
|
|
||||||
[MITM]
|
[MITM]
|
||||||
hostname=%APPEND% sub.store
|
hostname = %APPEND% sub.store
|
||||||
|
|
||||||
[Script]
|
[Script]
|
||||||
Sub-Store Core=type=http-request,pattern=^https?:\/\/sub\.store\/((download)|api\/(preview|sync|(utils\/node-info))),script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-1.min.js,requires-body=true,timeout=120,ability=http-client-policy
|
Sub-Store Core=type=http-request,pattern=^https?:\/\/sub\.store\/((download)|api\/(preview|sync|(utils\/node-info))),script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-1.min.js,requires-body=true,timeout=120
|
||||||
Sub-Store Simple=type=http-request,pattern=^https?:\/\/sub\.store,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-0.min.js,requires-body=true
|
Sub-Store Simple=type=http-request,pattern=^https?:\/\/sub\.store,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-0.min.js,requires-body=true
|
||||||
|
|
||||||
Sub-Store Sync=type=cron,cronexp=0 0 * * *,wake-system=1,timeout=120,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/cron-sync-artifacts.min.js
|
Sub-Store Sync=type=cron,cronexp=0 0 * * *,wake-system=1,timeout=120,script-path=https://github.com/sub-store-org/Sub-Store/releases/latest/download/cron-sync-artifacts.min.js
|
||||||
|
|||||||
Reference in New Issue
Block a user