Skip to content

m-ui v0.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 11:47
· 1 commit to main since this release

m-ui v0.3.0

v0.3.0 makes it easy to move from 3x-ui to m-ui, adds per-client traffic resets and automatic renewal, and finishes the translation of everything the panel writes.

New

  • Import from 3x-ui or Xray. The dashboard's Manage card has a new Import button. Upload 3x-ui's x-ui.db (any version from v2.9.3 to v3.10.2) or an Xray config.json, or paste JSON. Inbounds, clients, outbounds, balancers and routing rules become Mihomo listeners, proxies, groups and rules.
    • From x-ui.db, every client keeps its traffic quota, expiry (including "N days after first use"), enabled state, comment, used traffic, reset schedule and auto-renewal, and its subscription ID becomes its m-ui subscription token, so existing subscription links keep their token.
    • The import only adds. When a port is already used in the panel, the existing inbound is kept; a taken name gets a -xray suffix; rules that already exist are skipped.
    • Anything Mihomo cannot do (multi-user Shadowsocks 2022, HTTPUpgrade inbounds, fallbacks, BitTorrent sniffing and so on) is listed with the reason in a conversion log you can download from the result window.
    • See the new wiki page Migrating from 3x-ui.
  • AND routing rules. One rule can combine several conditions, for example AND,((GEOSITE,openai),(IN-NAME,hk-reality)),WARP; conditions may nest AND, OR and NOT. Port rules accept / lists such as 25/465/587.
  • Per-client traffic reset. Each client can reset its own traffic hourly, daily, weekly or monthly on a chosen day, on top of the inbound's own schedule. A client that ran out of traffic can connect again right after its reset.
  • Automatic renewal. When a client expires, m-ui can extend it by N days, to a day of the next month or to the next chosen weekday, and clear its traffic for the new period, up to a maximum number of renewals. Periods missed while the panel was offline are caught up.
  • Monthly reset day for inbounds. A monthly inbound reset can run on any day from 1 to 31; in a shorter month it runs on the last day.

Fixes

  • A reset now lets blocked clients back in at once. A scheduled reset cleared the traffic of a client that had run out, but the client stayed locked out until Mihomo was restarted for another reason. m-ui now restarts Mihomo when a reset or renewal brings a client or inbound back.
  • Inbound limits are enforced while Mihomo runs. An inbound that used up its own quota or reached its expiry kept its listener until the next restart. It is now cut off within seconds like a client, and its nodes are left out of subscriptions.
  • Everything the panel writes follows the panel language. The panel's own log lines were always Chinese, the import result and conversion log were always English, and 34 server messages (Clash Caesar device errors, VPNGate installation errors, geo file checks and others) had no translation. All of them now follow the panel language in all 11 languages. Text built while the page loaded, such as the tooltips of the subscription path buttons, could also stay in Chinese; that is fixed too.

Notes

  • Changing a client's or inbound's reset schedule starts the new period when you save it, so turning on a daily reset does not clear the traffic of an old client at once.
  • m-ui restarts Mihomo by itself when a client or inbound is cut off or let back in. The panel log records each restart, and clients reconnect on their own.

v0.3.0 让 3x-ui 用户可以方便地迁移到 m-ui,新增客户端级的流量周期重置和到期自动续期,并把面板输出的所有文字都翻译完整。

新功能

  • 从 3x-ui 或 Xray 导入。 仪表盘的管理卡片新增导入按钮。上传 3x-ui 的 x-ui.db(v2.9.3 到 v3.10.2 的任何版本)或 Xray 的 config.json,也可以直接粘贴 JSON。入站、客户端、出站、负载均衡和路由规则会转换成 Mihomo 的 listener、proxy、策略组和规则。
    • 用 x-ui.db 导入时,每个客户端都会保留流量限额、到期时间(包括"首次使用后 N 天")、启用状态、备注、已用流量、重置周期和自动续期;订阅 ID 会成为 m-ui 的订阅 token,原来的订阅链接 token 不变。
    • 导入只增加内容。端口和面板里已有的入站冲突时保留已有的;重名的会加上 -xray 后缀;已经存在的规则会跳过。
    • Mihomo 做不到的部分(多用户 Shadowsocks 2022、HTTPUpgrade 入站、回落、BitTorrent 嗅探等)会连同原因写进转换日志,可以在结果窗口里下载。
    • 详见新的 wiki 页面从 3x-ui 迁移。
  • AND 路由规则。 一条规则可以组合多个条件,例如 AND,((GEOSITE,openai),(IN-NAME,hk-reality)),WARP,条件里还可以嵌套 AND、OR、NOT。端口规则支持用 / 写多个端口,例如 25/465/587。
  • 客户端周期流量重置。 每个客户端都可以按每小时、每天、每周或每月指定日期重置自己的流量,和入站自己的重置周期互不影响。流量用完的客户端重置后立刻可以重新连接。
  • 到期自动续期。 客户端到期时,m-ui 可以把到期时间延长 N 天、顺延到下个月的指定日期或下一个指定的星期几,并清零新周期的流量,可以设置最多续期几次。面板停机期间错过的周期会在重新启动后补上。
  • 入站每月重置日。 入站的每月重置可以设在 1 到 31 号的任意一天,遇到天数不够的月份就在月末执行。

问题修复

  • 重置后被停用的客户端会立刻恢复。 以前计划重置会清零已用完流量的客户端,但它要等 Mihomo 因为别的原因重启后才能重新连上。现在重置或续期让客户端或入站恢复可用时,m-ui 会重启 Mihomo。
  • 入站限额在 Mihomo 运行时也会生效。 以前入站自己的总流量用完或到期后,监听器要到下次重启才会停掉。现在它会和客户端一样在几秒内被停用,它的节点也不再出现在订阅里。
  • 面板输出的文字都跟随面板语言。 面板自己的日志一直是中文,导入结果和转换日志一直是英文,还有 34 条服务端提示(Clash Caesar 设备错误、VPNGate 安装错误、Geo 文件校验等)从来没有翻译。现在它们都会按面板语言显示,11 种语言全部覆盖。页面加载时生成的文字(例如订阅路径按钮的提示)也可能停留在中文,这个问题也一并修复。

说明

  • 修改客户端或入站的重置周期后,新周期从保存那一刻开始计算,所以给老客户端打开每日重置不会马上清零它的流量。
  • 客户端或入站被停用、恢复时,m-ui 会自动重启 Mihomo。面板日志里会记录每一次,客户端会自动重连。

Full Changelog: v0.2.10...v0.3.0