Compare commits

...

3 Commits

Author SHA1 Message Date
xream
01eb69d8ae ci: GitHub Action 2025-01-09 09:35:07 +08:00
xream
797ba6f601 fix: 修复 Loon Shadow TLS 2025-01-09 09:30:16 +08:00
xream
128353a7f3 feat: gist 单页数量改为 100 2025-01-09 09:14:36 +08:00
4 changed files with 17 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
name: build
on:
workflow_dispatch:
push:
branches:
- master

View File

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

View File

@@ -66,6 +66,8 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
`${proxy.name}=shadowsocks,${proxy.server},${proxy.port},${proxy.cipher},"${proxy.password}"`,
);
let isShadowTLS;
// obfs
if (isPresent(proxy, 'plugin')) {
if (proxy.plugin === 'obfs') {
@@ -97,6 +99,7 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
);
// udp-port
result.appendIfPresent(`,udp-port=${proxy['udp-port']}`, 'udp-port');
isShadowTLS = true;
} else if (['shadow-tls'].includes(proxy.plugin) && proxy['plugin-opts']) {
const password = proxy['plugin-opts'].password;
const host = proxy['plugin-opts'].host;
@@ -119,6 +122,7 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
`,udp-port=${proxy['udp-port']}`,
'udp-port',
);
isShadowTLS = true;
}
}
@@ -130,7 +134,7 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
result.append(`,udp=true`);
}
if (!includeUnsupportedProxy && result.includes(',shadow-tls-password=')) {
if (!includeUnsupportedProxy && isShadowTLS) {
throw new Error(
`shadow-tls is not supported(请使用 includeUnsupportedProxy 参数)`,
);

View File

@@ -114,15 +114,17 @@ export default class Gist {
return;
});
} else {
return this.http.get('/gists').then((response) => {
const gists = JSON.parse(response.body);
for (let g of gists) {
if (g.description === this.key) {
return g;
return this.http
.get('/gists?per_page=100&page=1')
.then((response) => {
const gists = JSON.parse(response.body);
for (let g of gists) {
if (g.description === this.key) {
return g;
}
}
}
return;
});
return;
});
}
}