mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ad42f2c10 | ||
|
|
ec06eb8659 | ||
|
|
4a23a4d8b6 | ||
|
|
913638a233 | ||
|
|
bf642ce0e6 | ||
|
|
1ecac9da92 |
@@ -35,7 +35,7 @@ Core functionalities:
|
|||||||
- [x] Surfboard (SS, VMess, Trojan, HTTP, SOCKS5, SOCKS5-TLS, WireGuard(Surfboard to Surfboard))
|
- [x] Surfboard (SS, VMess, Trojan, HTTP, SOCKS5, SOCKS5-TLS, WireGuard(Surfboard to Surfboard))
|
||||||
- [x] Shadowrocket (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, Hysteria 2, TUIC)
|
- [x] Shadowrocket (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, Hysteria 2, TUIC)
|
||||||
- [x] Clash.Meta (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, Hysteria 2, TUIC)
|
- [x] Clash.Meta (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, Hysteria 2, TUIC)
|
||||||
- [x] Stash (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, TUIC)
|
- [x] Stash (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, TUIC, Juicity, SSH)
|
||||||
- [x] Clash (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard)
|
- [x] Clash (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard)
|
||||||
|
|
||||||
### Supported Target Platforms
|
### Supported Target Platforms
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.333",
|
"version": "2.14.337",
|
||||||
"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": {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ async function processFn(proxies, operators = [], targetPlatform, source) {
|
|||||||
const { mode, content } = item.args;
|
const { mode, content } = item.args;
|
||||||
if (mode === 'link') {
|
if (mode === 'link') {
|
||||||
let noCache;
|
let noCache;
|
||||||
let url = content;
|
let url = content || '';
|
||||||
if (url.endsWith('#noCache')) {
|
if (url.endsWith('#noCache')) {
|
||||||
url = url.replace(/#noCache$/, '');
|
url = url.replace(/#noCache$/, '');
|
||||||
noCache = true;
|
noCache = true;
|
||||||
@@ -338,7 +338,11 @@ function lastParse(proxy) {
|
|||||||
proxy.network = 'tcp';
|
proxy.network = 'tcp';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(proxy.type)) {
|
if (
|
||||||
|
['trojan', 'tuic', 'hysteria', 'hysteria2', 'juicity'].includes(
|
||||||
|
proxy.type,
|
||||||
|
)
|
||||||
|
) {
|
||||||
proxy.tls = true;
|
proxy.tls = true;
|
||||||
}
|
}
|
||||||
if (proxy.network) {
|
if (proxy.network) {
|
||||||
|
|||||||
@@ -133,9 +133,13 @@ export default function Clash_Producer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(
|
[
|
||||||
proxy.type,
|
'trojan',
|
||||||
)
|
'tuic',
|
||||||
|
'hysteria',
|
||||||
|
'hysteria2',
|
||||||
|
'juicity',
|
||||||
|
].includes(proxy.type)
|
||||||
) {
|
) {
|
||||||
delete proxy.tls;
|
delete proxy.tls;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,9 +149,13 @@ export default function ClashMeta_Producer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(
|
[
|
||||||
proxy.type,
|
'trojan',
|
||||||
)
|
'tuic',
|
||||||
|
'hysteria',
|
||||||
|
'hysteria2',
|
||||||
|
'juicity',
|
||||||
|
].includes(proxy.type)
|
||||||
) {
|
) {
|
||||||
delete proxy.tls;
|
delete proxy.tls;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,9 +152,13 @@ export default function ShadowRocket_Producer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(
|
[
|
||||||
proxy.type,
|
'trojan',
|
||||||
)
|
'tuic',
|
||||||
|
'hysteria',
|
||||||
|
'hysteria2',
|
||||||
|
'juicity',
|
||||||
|
].includes(proxy.type)
|
||||||
) {
|
) {
|
||||||
delete proxy.tls;
|
delete proxy.tls;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,8 +202,8 @@ const tlsParser = (proxy, parsedProxy) => {
|
|||||||
parsedProxy.tls.alpn = [proxy.alpn];
|
parsedProxy.tls.alpn = [proxy.alpn];
|
||||||
} else if (Array.isArray(proxy.alpn)) parsedProxy.tls.alpn = proxy.alpn;
|
} else if (Array.isArray(proxy.alpn)) parsedProxy.tls.alpn = proxy.alpn;
|
||||||
if (proxy.ca) parsedProxy.tls.certificate_path = `${proxy.ca}`;
|
if (proxy.ca) parsedProxy.tls.certificate_path = `${proxy.ca}`;
|
||||||
if (proxy.ca_str) parsedProxy.tls.certificate = proxy.ca_sStr;
|
if (proxy.ca_str) parsedProxy.tls.certificate = [proxy.ca_str];
|
||||||
if (proxy['ca-str']) parsedProxy.tls.certificate = proxy['ca-str'];
|
if (proxy['ca-str']) parsedProxy.tls.certificate = [proxy['ca-str']];
|
||||||
if (proxy['client-fingerprint'] && proxy['client-fingerprint'] !== '')
|
if (proxy['client-fingerprint'] && proxy['client-fingerprint'] !== '')
|
||||||
parsedProxy.tls.utls = {
|
parsedProxy.tls.utls = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ export default function Stash_Producer() {
|
|||||||
'wireguard',
|
'wireguard',
|
||||||
'hysteria',
|
'hysteria',
|
||||||
'hysteria2',
|
'hysteria2',
|
||||||
|
'ssh',
|
||||||
|
'juicity',
|
||||||
].includes(proxy.type) ||
|
].includes(proxy.type) ||
|
||||||
(proxy.type === 'ss' &&
|
(proxy.type === 'ss' &&
|
||||||
![
|
![
|
||||||
@@ -232,9 +234,13 @@ export default function Stash_Producer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(
|
[
|
||||||
proxy.type,
|
'trojan',
|
||||||
)
|
'tuic',
|
||||||
|
'hysteria',
|
||||||
|
'hysteria2',
|
||||||
|
'juicity',
|
||||||
|
].includes(proxy.type)
|
||||||
) {
|
) {
|
||||||
delete proxy.tls;
|
delete proxy.tls;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,11 @@ export default function URI_Producer() {
|
|||||||
delete proxy[key];
|
delete proxy[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(proxy.type)) {
|
if (
|
||||||
|
['trojan', 'tuic', 'hysteria', 'hysteria2', 'juicity'].includes(
|
||||||
|
proxy.type,
|
||||||
|
)
|
||||||
|
) {
|
||||||
delete proxy.tls;
|
delete proxy.tls;
|
||||||
}
|
}
|
||||||
if (proxy.server && isIPv6(proxy.server)) {
|
if (proxy.server && isIPv6(proxy.server)) {
|
||||||
|
|||||||
@@ -123,10 +123,11 @@ async function downloadSubscription(req, res) {
|
|||||||
['localFirst', 'remoteFirst'].includes(sub.mergeSources)
|
['localFirst', 'remoteFirst'].includes(sub.mergeSources)
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
url = `${url || sub.url}`
|
url =
|
||||||
|
`${url || sub.url}`
|
||||||
.split(/[\r\n]+/)
|
.split(/[\r\n]+/)
|
||||||
.map((i) => i.trim())
|
.map((i) => i.trim())
|
||||||
.filter((i) => i.length)?.[0];
|
.filter((i) => i.length)?.[0] || '';
|
||||||
|
|
||||||
let $arguments = {};
|
let $arguments = {};
|
||||||
const rawArgs = url.split('#');
|
const rawArgs = url.split('#');
|
||||||
@@ -283,10 +284,11 @@ async function downloadCollection(req, res) {
|
|||||||
['localFirst', 'remoteFirst'].includes(sub.mergeSources)
|
['localFirst', 'remoteFirst'].includes(sub.mergeSources)
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
let url = `${sub.url}`
|
let url =
|
||||||
|
`${sub.url}`
|
||||||
.split(/[\r\n]+/)
|
.split(/[\r\n]+/)
|
||||||
.map((i) => i.trim())
|
.map((i) => i.trim())
|
||||||
.filter((i) => i.length)?.[0];
|
.filter((i) => i.length)?.[0] || '';
|
||||||
|
|
||||||
let $arguments = {};
|
let $arguments = {};
|
||||||
const rawArgs = url.split('#');
|
const rawArgs = url.split('#');
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ export default function register($app) {
|
|||||||
async function getFlowInfo(req, res) {
|
async function getFlowInfo(req, res) {
|
||||||
let { name } = req.params;
|
let { name } = req.params;
|
||||||
name = decodeURIComponent(name);
|
name = decodeURIComponent(name);
|
||||||
|
let { url } = req.query;
|
||||||
|
if (url) {
|
||||||
|
url = decodeURIComponent(url);
|
||||||
|
$.info(`指定远程订阅 URL: ${url}`);
|
||||||
|
}
|
||||||
const allSubs = $.read(SUBS_KEY);
|
const allSubs = $.read(SUBS_KEY);
|
||||||
const sub = findByName(allSubs, name);
|
const sub = findByName(allSubs, name);
|
||||||
if (!sub) {
|
if (!sub) {
|
||||||
@@ -68,10 +73,11 @@ async function getFlowInfo(req, res) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let url = `${sub.url}`
|
url =
|
||||||
|
`${url || sub.url}`
|
||||||
.split(/[\r\n]+/)
|
.split(/[\r\n]+/)
|
||||||
.map((i) => i.trim())
|
.map((i) => i.trim())
|
||||||
.filter((i) => i.length)?.[0];
|
.filter((i) => i.length)?.[0] || '';
|
||||||
|
|
||||||
let $arguments = {};
|
let $arguments = {};
|
||||||
const rawArgs = url.split('#');
|
const rawArgs = url.split('#');
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import $ from '@/core/app';
|
|||||||
const tasks = new Map();
|
const tasks = new Map();
|
||||||
|
|
||||||
export default async function download(
|
export default async function download(
|
||||||
rawUrl,
|
rawUrl = '',
|
||||||
ua,
|
ua,
|
||||||
timeout,
|
timeout,
|
||||||
proxy,
|
proxy,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export function getFlowField(headers) {
|
|||||||
return headers[subkey];
|
return headers[subkey];
|
||||||
}
|
}
|
||||||
export async function getFlowHeaders(rawUrl, ua, timeout, proxy, flowUrl) {
|
export async function getFlowHeaders(rawUrl, ua, timeout, proxy, flowUrl) {
|
||||||
let url = flowUrl || rawUrl;
|
let url = flowUrl || rawUrl || '';
|
||||||
let $arguments = {};
|
let $arguments = {};
|
||||||
const rawArgs = url.split('#');
|
const rawArgs = url.split('#');
|
||||||
url = url.split('#')[0];
|
url = url.split('#')[0];
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ function operator(proxies = [], targetPlatform, context) {
|
|||||||
// 4. 一个比较折腾的方案: 在脚本操作中, 把内容同步到另一个 gist
|
// 4. 一个比较折腾的方案: 在脚本操作中, 把内容同步到另一个 gist
|
||||||
// 见 https://t.me/zhetengsha/1428
|
// 见 https://t.me/zhetengsha/1428
|
||||||
//
|
//
|
||||||
// const content = ProxyUtils.produce(proxies, platform)
|
// const content = ProxyUtils.produce([...proxies], platform)
|
||||||
|
|
||||||
// // YAML
|
// // YAML
|
||||||
// ProxyUtils.yaml.load('YAML String')
|
// ProxyUtils.yaml.load('YAML String')
|
||||||
|
|||||||
Reference in New Issue
Block a user