mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-13 18:36:02 +08:00
feat: produceArtifact 支持 Stash internal (Fixes #271)
This commit is contained in:
parent
059c4bd148
commit
4966132397
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.173",
|
"version": "2.14.174",
|
||||||
"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": {
|
||||||
|
@ -2,12 +2,11 @@ import { isPresent } from '@/core/proxy-utils/producers/utils';
|
|||||||
|
|
||||||
export default function Stash_Producer() {
|
export default function Stash_Producer() {
|
||||||
const type = 'ALL';
|
const type = 'ALL';
|
||||||
const produce = (proxies) => {
|
const produce = (proxies, type, opts = {}) => {
|
||||||
// https://stash.wiki/proxy-protocols/proxy-types#shadowsocks
|
// https://stash.wiki/proxy-protocols/proxy-types#shadowsocks
|
||||||
return (
|
const list = proxies
|
||||||
'proxies:\n' +
|
|
||||||
proxies
|
|
||||||
.filter((proxy) => {
|
.filter((proxy) => {
|
||||||
|
if (opts['include-unsupported-proxy']) return true;
|
||||||
if (
|
if (
|
||||||
![
|
![
|
||||||
'ss',
|
'ss',
|
||||||
@ -40,8 +39,7 @@ export default function Stash_Producer() {
|
|||||||
'chacha20-ietf-poly1305',
|
'chacha20-ietf-poly1305',
|
||||||
'xchacha20-ietf-poly1305',
|
'xchacha20-ietf-poly1305',
|
||||||
].includes(proxy.cipher)) ||
|
].includes(proxy.cipher)) ||
|
||||||
(proxy.type === 'snell' &&
|
(proxy.type === 'snell' && String(proxy.version) === '4') ||
|
||||||
String(proxy.version) === '4') ||
|
|
||||||
(proxy.type === 'vless' && proxy['reality-opts'])
|
(proxy.type === 'vless' && proxy['reality-opts'])
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
@ -233,10 +231,14 @@ export default function Stash_Producer() {
|
|||||||
) {
|
) {
|
||||||
delete proxy[`${proxy.network}-opts`]['_grpc-type'];
|
delete proxy[`${proxy.network}-opts`]['_grpc-type'];
|
||||||
}
|
}
|
||||||
return ' - ' + JSON.stringify(proxy) + '\n';
|
return proxy;
|
||||||
})
|
});
|
||||||
.join('')
|
return type === 'internal'
|
||||||
);
|
? list
|
||||||
|
: 'proxies:\n' +
|
||||||
|
list
|
||||||
|
.map((proxy) => ' - ' + JSON.stringify(proxy) + '\n')
|
||||||
|
.join('');
|
||||||
};
|
};
|
||||||
return { type, produce };
|
return { type, produce };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user