Files
Sub-Store/backend
hhh2210 e6157005e8 feat(surgemac): expose mihomoMerge / mihomoMergeName via URL query
The producer (producers/surgemac.js) already supports a merge mode
that emits N SOCKS5 listeners + one shared mihomo external process,
avoiding the "one mihomo process per node" pattern. However the only
way to enable it today is to write a per-proxy script operator that
sets `_merge = true`.

For users on networks where many subscription nodes are unreachable
(e.g. CERNET / 校园网 to overseas VPS), the current default spawns
dozens of idle-but-stuck mihomo subprocesses, each accumulating
~8s GFW-timeout outbound attempts that can cause system-wide
slowdown.

This patch wires two new URL query parameters into `produceOpts`:

- `mihomoMerge=true|1` — enables the existing merge mode
- `mihomoMergeName=<name>` — optional name for the merged entry

Both only take effect when `target=SurgeMac` (i.e. when
`useMihomoExternal` is already on).

No behavior change for existing requests; default is unchanged.
2026-05-15 11:18:31 +08:00
..
2023-08-28 20:41:40 +08:00
2022-06-16 14:24:32 +08:00
2022-05-24 21:20:26 +08:00
2022-07-06 18:12:36 +08:00