mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
feat: Added dedicated Stash producer
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
export default function Clash_Producer() {
|
||||
const type = 'ALL';
|
||||
const produce = (proxies) => {
|
||||
proxies.filter((proxy) => {
|
||||
if (proxy.type === 'vless') return false;
|
||||
return true;
|
||||
});
|
||||
return (
|
||||
'proxies:\n' +
|
||||
proxies
|
||||
.map((proxy) => {
|
||||
delete proxy.supported;
|
||||
delete proxy['tls-fingerprint'];
|
||||
delete proxy['vmess-aead'];
|
||||
return ' - ' + JSON.stringify(proxy) + '\n';
|
||||
})
|
||||
.join('')
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Surge_Producer from './surge';
|
||||
import Clash_Producer from './clash';
|
||||
import Stash_Producer from './stash';
|
||||
import Loon_Producer from './loon';
|
||||
import URI_Producer from './uri';
|
||||
import QX_Producer from './qx';
|
||||
@@ -17,4 +18,5 @@ export default {
|
||||
Clash: Clash_Producer(),
|
||||
URI: URI_Producer(),
|
||||
JSON: JSON_Producer(),
|
||||
Stash: Stash_Producer(),
|
||||
};
|
||||
|
||||
16
backend/src/core/proxy-utils/producers/stash.js
Normal file
16
backend/src/core/proxy-utils/producers/stash.js
Normal file
@@ -0,0 +1,16 @@
|
||||
export default function Stash_Producer() {
|
||||
const type = 'ALL';
|
||||
const produce = (proxies) => {
|
||||
return (
|
||||
'proxies:\n' +
|
||||
proxies
|
||||
.map((proxy) => {
|
||||
delete proxy['tls-fingerprint'];
|
||||
delete proxy['vmess-aead'];
|
||||
return ' - ' + JSON.stringify(proxy) + '\n';
|
||||
})
|
||||
.join('')
|
||||
);
|
||||
};
|
||||
return { type, produce };
|
||||
}
|
||||
Reference in New Issue
Block a user