Compare commits

...

2 Commits

Author SHA1 Message Date
xream
b8897dd94a fix: 修复 Egern transport 兼容性
Some checks failed
build / build (push) Has been cancelled
2025-07-08 21:59:16 +08:00
xream
71958e6bb1 doc: demo.js 2025-07-08 09:43:31 +08:00
3 changed files with 30 additions and 1 deletions

View File

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

View File

@@ -377,6 +377,23 @@ export default function Egern_Producer() {
delete proxy.id;
delete proxy.resolved;
delete proxy['no-resolve'];
if (proxy.transport) {
for (const key in proxy.transport) {
if (
Object.keys(proxy.transport[key]).length === 0 ||
Object.values(proxy.transport[key]).every(
(v) => v == null,
)
) {
delete proxy.transport[key];
}
}
if (Object.keys(proxy.transport).length === 0) {
delete proxy.transport;
}
}
if (type !== 'internal') {
for (const key in proxy) {
if (proxy[key] == null || /^_/i.test(key)) {

View File

@@ -151,6 +151,18 @@ function operator(proxies = [], targetPlatform, context) {
// });
// $server.sni = sni
// 示例: 从 config 文件中读取配置项并进行节点操作
// config 的本地内容为
// {
// "reuse": false
// }
// 脚本操作为
// const config = (ProxyUtils.JSON5 || JSON).parse(await produceArtifact({
// type: 'file',
// name: 'config' // 文件名
// }))
// $server.reuse = config.reuse
// 1. Surge 输出 WireGuard 完整配置
// let proxies = await produceArtifact({