xream 7be333d624 feat: 支持 VLESS ECH 配置在 URI 与 Mihomo 间互转(含 nested xhttp 与告警)
- 新增 `backend/src/core/proxy-utils/ech-utils.js`,统一提取与校验 ECH 配置逻辑:支持 `echConfigList` / `echForceQuery`,并新增 Xray 与 Mihomo `ech-opts` 的双向转换能力。
- `backend/src/core/proxy-utils/parsers/index.js`:
  - 在 VLESS TLS 字段解析中新增 `echConfigList`、`echForceQuery`、`echSockopt` 的兼容性校验;
  - 解析 URI `ech` 参数时映射为 `ech-opts` sidecar;
  - `downloadSettings.tlsSettings` 的导出改为复用统一 ECH 构建逻辑。
- `backend/src/core/proxy-utils/producers/uri.js`:
  - URI 输出时从 `ech-opts` 回填 `ech` 参数;
  - 支持 `ech-opts._dns` 与 `query-server-name` 的拼装(含默认 `https://dns.alidns.com/dns-query` 回退);
  - `nested xhttp` 下的 TLS ECH 参数(`_dns`/`_force-query`/`_sockopt`)同步到 `extra` 的 `tlsSettings`;
  - 增加默认 DNS 场景告警。
- `backend/src/core/proxy-utils/producers/clashmeta.js`:
  - 输出到 mihomo 时发现 `ech-opts` 内含 ECH DNS 时给出明确 warning,引导改为 `dns["nameserver-policy"]` 配置。
- 测试覆盖补齐(parser / structured / text):新增/更新多组用例,覆盖 ECH base config、ECH DNS、`_force-query`、`_sockopt`、默认 DNS 回退、以及 nested xhttp 下载场景的导入导出闭环。
- 文档与版本:
  - `scripts/demo.js` 注释更新说明规则与转换行为;
2026-05-09 10:13:52 +08:00
2026-05-06 14:53:04 +08:00
2022-07-06 18:11:49 +08:00
2026-04-15 15:44:43 +08:00
2022-05-25 18:34:02 +08:00


Sub-Store

Sub-Store

Advanced Subscription Manager for QX, Loon, Surge, Stash, Egern and Shadowrocket.

Build GitHub GitHub issues GitHub closed pull requests Lines of code Size sub-store-org%2FSub-Store | Trendshift "Buy Me A Coffee"

📚 文档/DOC

Core functionalities:

  1. Conversion among various formats.
  2. Subscription formatting.
  3. Collect multiple subscriptions in one URL.
  4. Host and modify subscriptions/files

The following descriptions of features may not be updated in real-time. Please refer to the actual available features for accurate information.

1. Subscription Conversion

Supported Input Formats

本地节点怎么写/How To Write A Local Node

⚠️ Do not use Shadowrocket or NekoBox to export URI and then import it as input. The URIs exported in this way may not be standard URIs. However, we have already supported some very common non-standard URIs (such as VMess, VLESS).

  • Proxy URI Scheme(socks5, socks5+tls, http, https(it's ok))

    example: socks5+tls://user:pass@ip:port#name

  • URI(AnyTLS, SOCKS, SS, SSR, VMess, VLESS, Trojan, Hysteria, Hysteria 2, TUIC v5, WireGuard)

    Please note, HTTP(s) does not have a standard URI format, so it is not supported. Please use other formats.

  • Clash Proxies YAML

  • Clash Proxy JSON/JSON5/YAML(single line)

    NaiveProxy

  • QX (SS, SSR, VMess, Trojan, HTTP, SOCKS5, VLESS, AnyTLS)

  • Loon (SS, SSR, VMess, Trojan, HTTP, SOCKS5, SOCKS5-TLS, WireGuard, VLESS, Hysteria 2, AnyTLS)

  • Surge (Direct, SS, VMess, Trojan, HTTP, SOCKS5, SOCKS5-TLS, AnyTLS, TrustTunnel, TUIC, Snell, Hysteria 2, SSH(Password authentication only), External Proxy Program(only for macOS), WireGuard(Surge to Surge))

  • mihomo(Clash.Meta) Compatible (Direct, SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, Hysteria 2, TUIC, SSH, mieru, sudoku, AnyTLS, MASQUE, Tailscale)

Deprecated(The frontend doesn't show it, but the backend still supports it, with the query parameter target=Clash):

  • Clash (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard)

Supported Target Platforms

  • Plain JSON
  • Stash
  • Clash.Meta(mihomo)
  • Surfboard
  • Surge
  • SurgeMac(Use mihomo to support protocols that are not supported by Surge itself)
  • Loon
  • Egern
  • Shadowrocket
  • QX
  • sing-box
  • V2Ray
  • V2Ray URI

Deprecated:

  • Clash

2. Subscription Formatting

Filtering

  • Regex filter
  • Discard regex filter
  • Region filter
  • Type filter
  • Useless proxies filter
  • Script filter

Proxy Operations

  • Set property operator: set some proxy properties such as udp,tfo, skip-cert-verify etc.
  • Flag operator: add flags or remove flags for proxies.
  • Sort operator: sort proxies by name.
  • Regex sort operator: sort proxies by keywords (fallback to normal sort).
  • Regex rename operator: replace by regex in proxy names.
  • Regex delete operator: delete by regex in proxy names.
  • Script operator: modify proxy by script.
  • Resolve Domain Operator: resolve the domain of nodes to an IP address.

Development

Install pnpm

Go to backend directories, install node dependencies:

pnpm i
SUB_STORE_BACKEND_API_PORT=3000 pnpm esbuild:dev

or this one if you're using Termux

SUB_STORE_BACKEND_API_PORT=3000 pnpm run --parallel "/^dev:.*/"

Build

pnpm bundle:esbuild

LICENSE

This project is under the GPL V3 LICENSE.

FOSSA Status

Star History

Star History Chart

Acknowledgements

  • Special thanks to @KOP-XIAO for his awesome resource-parser. Please give a star for his great work!
  • Special thanks to @Orz-3 and @58xinian for their awesome icons.

Sponsors

image

NodeSupport sponsored this project.

S
Description
No description provided
Readme AGPL-3.0
23 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 100%