Skip to content

m-ui v0.3.3

Latest

Choose a tag to compare

@github-actions github-actions released this 15 Nov 10:06

m-ui v0.3.3

v0.3.3 lets a Shadowsocks inbound serve several clients on one port, each with its own password, quota, expiry and traffic.

New

  • Several clients on one Shadowsocks inbound. This uses the users option that Mihomo v1.19.34 added to its Shadowsocks listener. The core reports which client each connection belongs to, so traffic, quotas, expiry, renewal and disabling work per client, as for VLESS or Trojan.
    • AEAD ciphers (aes-128-gcm, aes-256-gcm, chacha20-ietf-poly1305, …): add clients as usual. Every client keeps its own password, so existing links do not change.
    • 2022-blake3-aes-128-gcm / 2022-blake3-aes-256-gcm: the inbound gets a Server PSK (shown under Cipher) when you add the second client, and each client connects with server PSK:user PSK. Share links, QR codes and subscriptions already contain the combined password. The first client's link changes at that moment; subscribed clients pick it up on their next update. Once set, the server PSK is kept, so links do not change back.
    • 2022-blake3-chacha20-poly1305 cannot tell users apart and still allows one client.
    • With a single client the listener is written exactly as before.
  • Import multi-user Shadowsocks from 3x-ui / Xray and from Mihomo YAML. These inbounds used to be skipped; they now come across with all their clients.

Changes

  • Multi-user Shadowsocks needs Mihomo v1.19.34 or newer on the server. m-ui refuses to save such an inbound or to start an older core with it, because older cores ignore users: an AEAD inbound would not start, and a 2022 inbound would let in anyone who knows the server PSK, which every user's link contains. m-ui update does not replace the core; switch it with the version button on the dashboard's Mihomo card. Single-client inbounds keep working on older cores.
  • Docker images now ship Mihomo v1.19.34. An existing container keeps the core in its m-ui-core volume; switch the version on the dashboard if you want the new one.
  • Clients do not need a new version. Tested with a Mihomo v1.19.33 client against a v1.19.34 server, TCP and UDP, for 2022 AES-128/256, aes-256-gcm and chacha20-ietf-poly1305: every enabled client connected and was identified, and disabled clients, the bare server PSK and wrong passwords were refused. For 2022 ciphers the client must understand server PSK:user PSK (Mihomo / Clash Meta, sing-box and Xray do).

Fixes

  • Traffic of single-client Shadowsocks, Snell and Sudoku inbounds now counts for their client. These listeners report no user, so until now only the inbound total grew and the client's quota, online state and first-use expiry never moved.

Notes


v0.3.3 让一个 Shadowsocks 入站可以在同一端口服务多个客户端,每个客户端有自己的密码、限额、到期时间和流量统计。

新功能

  • 一个 Shadowsocks 入站可以有多个客户端。 用的是 Mihomo v1.19.34 给 Shadowsocks listener 新增的 users 选项。内核会报告每条连接属于哪个客户端,所以流量、限额、到期、续期和停用都能按客户端生效,和 VLESS、Trojan 一样。
    • AEAD 加密(aes-128-gcm、aes-256-gcm、chacha20-ietf-poly1305 等):照常添加客户端即可。每个客户端保留自己的密码,已有的链接不会变。
    • 2022-blake3-aes-128-gcm / 2022-blake3-aes-256-gcm:添加第二个客户端时,入站会生成一个服务端 PSK(在 Cipher 下方),每个客户端用 服务端 PSK:用户 PSK 连接,分享链接、二维码和订阅里已经是拼好的密码。此时第一个客户端的链接也会变,订阅用户下次更新时会自动拿到新的。服务端 PSK 一旦设置就会保留,链接不会再变回去。
    • 2022-blake3-chacha20-poly1305 无法区分用户,仍然只能有一个客户端。
    • 只有一个客户端时,listener 的写法和以前完全一样。
  • 能从 3x-ui / Xray 和 Mihomo YAML 导入多用户 Shadowsocks。 这类入站以前会被跳过,现在会连同所有客户端一起导入。

变更

  • 多用户 Shadowsocks 要求服务端使用 Mihomo v1.19.34 或更高版本。 m-ui 会拒绝保存这样的入站,也不会用旧内核启动它。旧内核不认识 users:AEAD 入站会起不来,2022 入站则会让任何知道服务端 PSK 的人连上,而每个用户的链接里都有服务端 PSK。m-ui update 不会更换内核,请用仪表盘 Mihomo 卡片上的版本按钮切换。单客户端的入站在旧内核上照常可用。
  • Docker 镜像改为内置 Mihomo v1.19.34。 已有容器的内核保存在 m-ui-core 卷里,不会自动更换;需要新版本时请在仪表盘切换。
  • 客户端不需要升级。 实测过:用 Mihomo v1.19.33 当客户端连接 v1.19.34 的服务端,TCP 和 UDP 都测了,加密方式包括 2022 AES-128/256、aes-256-gcm 和 chacha20-ietf-poly1305。所有启用的客户端都能连上并被正确识别;被停用的客户端、只带服务端 PSK 的连接和错误密码都被拒绝。2022 加密需要客户端认识 服务端 PSK:用户 PSK 这种写法,Mihomo(Clash Meta)、sing-box 和 Xray 都支持。

问题修复

  • 单客户端的 Shadowsocks、Snell、Sudoku 入站,流量现在会记到这个客户端名下。 这些 listener 不上报用户,以前只有入站总流量在涨,客户端的限额、在线状态和首次使用后才开始计算的到期时间都不会变化。

说明

Full Changelog: v0.3.2...v0.3.3