Why this fails quietly
Configuration parsers are strict about syntax and lenient about references. A group whose members do not exist is still a valid group object: mihomo logs a warning, drops the unresolvable names, and keeps the group. Startup succeeds. The failure surfaces later, when a rule matches the empty group, finds no outbound to use, and continues evaluating the remaining rules.
The consequences are worse than an error, because the remaining rules usually end in MATCH,DIRECT. Traffic that should have been tunnelled leaves unproxied and looks like a working connection — until you check an IP address and see your own.
Three sources of members, and which one is empty
A group is populated from exactly three places. Finding which one you relied on narrows the cause to one paragraph.
| Field | Populates from | Fails when |
|---|---|---|
proxies: | Names of entries in the top-level proxies: list, or other groups | A name differs by one character |
use: | Proxy providers declared under proxy-providers: | The provider failed to load or its health check removed everything |
include-all / include-all-proxies | Every defined proxy | The flag is absent and nothing else populated the group |
If the group lists names, the answer is a name mismatch. If it lists providers, the answer is provider state. If it lists neither, the group was never populated in the first place.
Name matching is exact and unforgiving
Names in mihomo are keys, matched byte for byte. Everything that survives a copy-paste also survives into a mismatch:
- Trailing spaces, which are invisible in YAML
- Full-width versus half-width parentheses and pipes
- Emoji or flag characters that look identical but are different code points
- Case differences, which matter —
HK-01andhk-01are two keys - YAML quoting: an unquoted name containing
:or#is truncated at that character
The last one is the quiet killer. A proxy named HK: 01 written without quotes becomes the key HK followed by a syntax fragment. The group referring to HK: 01 then resolves to nothing, and the error names a proxy you can see in the file.
The reliable test is mechanical, not visual. List the keys the file actually defines, then list the names the group asks for, and diff them:
python3 -c "
import yaml,sys
c=yaml.safe_load(open('config.yaml'))
have={p['name'] for p in c.get('proxies') or []}
for g in c.get('proxy-groups') or []:
want=set(g.get('proxies') or [])
miss=want-have
if miss: print(g['name'],'-> missing:',sorted(miss))
"
Anything printed by that script is a real mismatch. Anything not printed was matched correctly, and the problem is elsewhere.
Filters that match nothing
A group using filter or exclude-filter with include-all can end up empty without a single name being wrong, because the regular expression admits nothing. Common patterns that look right and are not:
filter: "香港|HK"against nodes namedHong Kong— no literal matchfilter: "^HK"against names prefixed with an emoji — the anchor never matchesexclude-filterthat is broader than intended, removing every member
Test the expression against the real names before trusting it. The count of matching names is the only evidence that matters.
Providers that load but contribute nothing
When a group uses use:, an empty group means the provider is defined but not delivering. Three states produce that:
| Provider state | Observation |
|---|---|
| Failed to fetch | A fetch error at startup; the group never receives members |
| Fetched, health check all failed | Members exist but all are marked unavailable, so no outbound qualifies |
| Fetched, parsed to zero proxies | The payload format is not what the provider type expects |
The middle row is easy to misread as an empty group. The members are there; they are all rejected. Distinguish by looking at whether the group's member count is zero or its available count is zero — the dashboard shows the difference even when the log does not.
Groups that reference groups
A group may name another group as a member. If the inner group is empty, the outer group is empty too, and the cause sits one level down. Audit from the leaves upward: providers first, then the groups that use them, then the selectors that reference those groups.
Fixing it without breaking the rules
- Run the diff script above. Name mismatches first, because they are the most common and the cheapest to fix.
- Check the filter expression against actual names and count the matches.
- Check provider state: fetched, parsed, healthy — three separate questions.
- Walk group-to-group references from the bottom up.
- After any change, confirm the group has members before testing traffic, since an empty group is indistinguishable from a direct connection at the browser.
Then verify no traffic is escaping: load an IP-check page through the rule that uses the group. If it reports your real address, the rule is still falling through and the group is still empty.
Frequently asked
Does an empty group stop mihomo from starting?
No. The core logs a warning and continues. That is why the failure is easy to miss: the service looks healthy while traffic bypasses the tunnel.
Why does the group show members but nothing works?
Members present and members available are different counts. If the health check marked every member down, the group resolves to no usable outbound.
Can a quoted and unquoted name refer to the same proxy?
No. YAML quoting changes how the scalar is parsed. An unquoted name containing a colon is truncated, so it defines a different key than the quoted form.
Do filters apply to providers as well as to the proxy list?
Yes, when the group pulls from a provider. The filter is evaluated against provider member names, so a pattern written for one naming scheme can match nothing in another.
How do I know traffic is leaking rather than proxied?
Load an address-check page through the rule that uses the group. If it reports your own address, the group was empty and the rules fell through to direct.