Skip to content

Mihomo Settings

RomanovCaesar edited this page Sep 11, 2026 · 2 revisions

English | 简体中文

Overview

Open Mihomo Settings from the sidebar. The page contains Basics, Outbounds, and Routing Rules.

Changes are edited as a draft. Click Save to persist them and regenerate config.yaml, then click Restart Mihomo to apply them to the running core.

Warning

Global and Direct modes do not execute the normal ordered routing-rule list. Use Rule mode for Basic Routing and custom Routing Rules.

Basics

General

Setting Description
Routing Mode Rule evaluates rules, Global uses the global selection, and Direct bypasses proxy routing.
Direct IP Version Selects dual stack, IPv4/IPv6 only, or a preferred family for direct traffic.
Outbound Test URL URL used for manual delay tests and new health-check groups.
IPv6 Allows Mihomo to resolve and use IPv6 addresses.
TCP Concurrent Attempts multiple resolved IPs concurrently and uses the first successful connection.
Unified Delay Uses a more comparable delay measurement across proxy protocols.

When Direct IP Version is not Dual Stack, m-ui creates a managed outbound named MUI-DIRECT and rewrites references to DIRECT where necessary. Do not manually create an outbound with that name.

Statistics

Inbound and client upload/download statistics are always enabled. Outbound upload and download statistics can be enabled separately.

  • Traffic Sampling Interval: 1–10 seconds. A longer interval reduces polling but can miss short connections.
  • Traffic Save Interval: 1–300 seconds. A shorter interval writes state more frequently.

Logs

  • Log Level: silent, error, warning, info, or debug. It is synchronized with Panel Settings.
  • Log Buffer Size: 100–10,000 lines retained by the panel.
  • Mask Address: replaces IP addresses in the panel's retained log view. It does not rewrite external system logs.
  • DNS Log: follows Debug logging; Mihomo does not expose this as an independent switch here.

Basic Routing

Basic Routing creates high-priority rules before the custom list:

  1. Block IPs
  2. Block Domains
  3. IPv4 Routing
  4. WARP Routing
  5. Custom Routing Rules

Accepted examples:

private
10.0.0.0/8
geoip:CN
example.com
full:api.example.com
keyword:ads
geosite:category-ads-all

IPv4 Routing creates a managed MUI-IPV4 direct outbound. WARP Routing requires an existing WARP WireGuard outbound. The disabled BitTorrent switch is informational: Mihomo does not provide Xray-style BitTorrent protocol matching, and port/domain guesses are not equivalent.

Outbounds

The page stores both Mihomo proxy nodes and policy groups because both can be Routing Rule targets.

Proxy types

The structured form supports common Mihomo types including:

  • Shadowsocks (ss)
  • SOCKS5
  • HTTP
  • VMess
  • VLESS
  • Trojan
  • Hysteria2
  • TUIC

The YAML editor can preserve additional native Mihomo fields and types that are not represented by every form field.

Policy groups

Supported group types include:

  • select
  • url-test
  • fallback
  • load-balance

Health-check groups use the configured test URL and interval. Every referenced proxy/group must exist, and group references must not create cycles.

Adding from YAML

  1. Click Add Outbound.
  2. Switch from Form to YAML.
  3. Paste a single proxy/group, a YAML array, or a document containing proxies and/or proxy-groups.
  4. Apply the parsed content to the draft.
  5. Click Save, then restart Mihomo.

Switching between Form and YAML does not validate the draft. Validation happens when content is applied/saved, so an incomplete YAML draft does not trap you in the editor.

Adding from a sharing link

Paste a supported node sharing link into the Link field and click its conversion button. m-ui converts the link locally into Mihomo YAML and displays it in the editor. It does not fetch remote subscription URLs. Review the result, apply it to the draft, save, and restart Mihomo.

Delay testing

Delay tests query the running Mihomo controller. The outbound must already have been saved, applied, and loaded by a running Mihomo instance. A new unsaved outbound cannot be tested.

Dialer proxy

An outbound can reference another outbound using Mihomo's dialer-proxy. Ensure the referenced name exists and avoid dependency cycles. When m-ui creates its managed direct policy, references to DIRECT may be rewritten accordingly.

Routing Rules

Rules are evaluated from top to bottom. Put specific rules before broad rules and keep MATCH last.

Each rule has:

  • Type: Mihomo matcher such as DOMAIN, DOMAIN-SUFFIX, GEOSITE, IP-CIDR, GEOIP, DST-PORT, IN-USER, PROCESS-NAME, NETWORK, or MATCH.
  • Payload: the value to match; MATCH has no payload.
  • Target: a proxy, policy group, or Mihomo builtin such as DIRECT, REJECT, or GLOBAL.
  • No Resolve: available for appropriate IP rules to avoid DNS resolution.

Examples:

DOMAIN-SUFFIX,example.com,My Proxy
GEOSITE,google,WARP
GEOIP,CN,DIRECT,no-resolve
MATCH,DIRECT

The editor validates target names and normalizes the final rule list before saving.

Reset behavior

Reset on the Basics page restores the Basics draft only. It does not delete outbounds, routing rules, WARP account data, or recorded traffic. The reset still requires Save and Restart Mihomo.

Raw configuration

Use the raw configuration view to inspect, copy, or download the generated YAML. m-ui owns this managed file; make durable changes through Inbounds, Mihomo Settings, or Panel Settings rather than editing generated output by hand.

Clone this wiki locally