Xiaomi AX3000T Follow-up: OpenClash Primary/Backup Routing, WireGuard Coexistence, and Lag Troubleshooting
Two weeks after flashing OpenWrt on the AX3000T: switching routing from HomeProxy to OpenClash (Meta core) with primary/backup lines, running WireGuard remote …
Scope: A Xiaomi AX3000T already flashed with OpenWrt (RD03; the example uses OpenWrt 25.12.6, kernel 6.12, APK package manager). Other OpenWrt routers with 256 MB of RAM can also refer to this, but check the memory and dependencies yourself.
Nature of this article: This is a follow-up to 《Xiaomi AX3000T OpenWrt Flashing Guide: HomeProxy Routing and WireGuard Remote Management》. Factory SSH unlock, full backup, dual-partition flashing, and basic network configuration are all covered in the previous article and won't be repeated here. This article documents the adjustments made over the following two weeks: switching routing from HomeProxy to OpenClash (Meta / mihomo kernel), the coexistence of WireGuard remote management and OpenClash, and troubleshooting lag on transoceanic lines. Server addresses, subscriptions, passwords, UUIDs, and public keys have all been removed; VPS_PUBLIC_IP, <...>, and 10.77.0.0/24 in the examples are for demonstration only.
1. What You End Up With
Terminal window
1
Internet
2
│
3
上级光猫 / 路由器
4
│
5
AX3000T WAN
6
│
7
┌────────────────────┐
8
│ Xiaomi AX3000T │
9
│ OpenWrt 25.12 │
10
│ OpenClash (mihomo) │
11
│ WireGuard client │
12
└────────────────────┘
13
│ │
14
LAN / Wi-Fi │ 加密 UDP 隧道
15
│ ▼
16
家中设备 公网 VPS(WireGuard Hub)
17
▲
18
│
19
手机蜂窝网络 WireGuard
Three goals, done separately without interfering with each other:
Base OpenWrt system: routing, Wi-Fi, DNS, LuCI, and package management work normally.
OpenClash routing: domestic traffic connects directly, everything else goes through the proxy; two proxy lines auto-switch between primary and backup, and specific services are pinned to a designated line.
WireGuard remote management: the phone accesses the router's management port via the VPS, without exposing the home intranet or routing all home traffic through the VPS.
The first item (flashing and basic networking) was covered in the previous article; this article only covers the latter two, plus the lag issues encountered after two weeks of use.
LuCI system overview: AX3000T, OpenWrt 25.12.6, running for 9 days
Current state: OpenWrt 25.12.6, running continuously for 9 days.
2. OpenClash Routing (Meta Kernel)
Only for managing nodes and networks you own or are authorized to use. OpenClash is the LuCI management layer; what actually handles traffic is the Meta (mihomo) kernel. Nodes, policy groups, rule sets, and DNS—these four parts must be checked separately.
2.1 Why Switch from HomeProxy to OpenClash
Requirement
HomeProxy + sing-box
OpenClash + mihomo
Two lines with automatic primary/backup failover
Need to write your own urltest/selection logic
fallback policy group supports it directly
Specific services pinned to a certain line
Possible, but risky to modify the generator
Just write the target policy group in the rule
Change rules without dropping the connection
Need to regenerate and restart
Controller API hot reload
Version compatibility
Ran into sing-box 1.13 removing old fields
Meta kernel and OpenClash update in sync
Don't enable both at the same time. Disable and remove HomeProxy before switching, to avoid both trying to take over the firewall and DNS.
2.2 Check Resources and Dependencies Before Installation
The AX3000T has only 256 MB of RAM. In practice, after OpenClash runs, only a few dozen MB of available memory remain, so choose small rule sets.
Terminal window
1
ubuscallsystemboard
2
free-m
3
df-h/overlay
4
apkupdate
OpenClash requires dnsmasq-full (replacing the default dnsmasq) and nftables transparent-proxy-related modules; refer to the dependency notes on the OpenClash release page for OpenWrt 25.12 / APK. Get the installation package from the Release of the official repository, and verify the version and architecture (AX3000T is aarch64_cortex-a53, choose linux-arm64 for the kernel).
After installation, confirm:
Terminal window
1
apklist-I | grep-E'openclash|dnsmasq'
2
ls/etc/openclash/core/# clash_meta should be present
2.3 Key Plugin Settings
In LuCI "OpenClash → Plugin Settings", the combination used in this article:
Setting
Value
Reason
Core
Meta
Supports Hysteria2 and .mrs rule sets
Run mode
fake-ip
Fast resolution; traffic splitting is determined by domain name
Proxy mode
rule
Traffic splitting by rules
UDP proxy
On
Games, voice, etc.
Disable QUIC
On
Browser QUIC over UDP can easily bypass rules; force fallback to TCP
IPv6
Off
The upstream at home does not provide usable IPv6; avoid leaks and timeouts
Router itself uses proxy
On
apk on the router and rule updates can also work
Auto-update subscriptions
Off
Use a handwritten configuration file; do not overwrite it with subscriptions
2.4 Configuration File Structure
Use a handwritten YAML (placed in /etc/openclash/config/); the core consists of three parts:
proxy-server-nameserver is specifically used to resolve node domains, avoiding the deadlock of "resolving a node requires connecting to the node first."
Each server provides both Hysteria2 (UDP) and VLESS + WS + TLS (TCP 443): when UDP is rate-limited or has severe packet loss, fallback will fall back to TCP.
"Dedicated line" is used for certain services sensitive to the egress IP (such as social platform accounts), fixed to machine B, and does not drift with primary/backup switching.
节点选择 retains a manual entry, which can be temporarily switched during speed testing; switch back to "Primary/Backup" after testing.
Rules (dedicated → private network direct → domestic direct → proxy for the rest)
.mrs binary rule sets are small and load quickly, suitable for routers with little memory.
Dedicated rules must be placed first; a platform often has multiple domains (video CDN, short links, old domains). If one is missed, the "page opens but video lags" situation occurs; add them domain by domain.
The WireGuard management subnet is a private network, already covered by the 10.0.0.0/8 direct rules, and will not be proxied.
2.5 Changing Rules: Modify Both Places, Then Hot Reload
When OpenClash starts, it processes the source configuration under config/ into the running configuration, so:
Back up first: cp -a /etc/openclash/config/<name>.yaml /etc/openclash/backup-<date>/.
Modify both/etc/openclash/config/<name>.yaml (source) and /etc/openclash/<name>.yaml (running). If you modify only the running configuration, it will be overwritten on the next restart; if you modify only the source configuration, it will take effect only after a restart.
Hot reload through the controller API without disconnecting the network:
Test one domestic site, one foreign site, and one site in the dedicated rules; check the actually matched rule and egress in the panel's "Connections".
After disabling OpenClash, confirm that the router can resume direct Internet access.
The panel (e.g., zashboard) is at 9090; access it only from the LAN or within WireGuard, and set the controller secret.
OpenClash running status: Meta core, rule mode
OpenClash running status, Meta core, rule mode; the control panel address has been redacted.
zashboard policy groups: Primary/Backup and Muse / Meta
Policy groups in zashboard: Primary/Backup currently uses Hysteria2 US-LA-CN2GAI; Muse / Meta is fixed to US-LA-198.
3. Managing the Router from the Internet with WireGuard
Use a public VPS as the Hub; this suits cases where the home WAN is behind NAT. Forward only the management subnet (split tunnel).
3.1 Addresses and Least Privilege
Device
WireGuard address
Purpose
VPS
10.77.0.1/24
Hub
AX3000T
10.77.0.2/32
Managed endpoint
Phone
10.77.0.3/32
Remote management client
Allow only: phone → router TCP 22 / 80 / 443 / 9090 (9090 is the OpenClash panel). Bind each peer to its own public key and a single /32.
Before kmod-wireguard (no such package), first verify the kernel version and the kmods source. If NO_DEVICE appears after ifup, check /lib/netifd/proto/wireguard.sh, and if necessary restart network while a LAN fallback channel is available.
Coexisting with OpenClash: If endpoint_host uses a domain name, the router resolves it through OpenClash's fake-ip and may get a fake 198.18.x.x address, causing the handshake to fail. Use an IP for the endpoint, or add the domain to fake-ip-filter.
3.4 Phone Side
Terminal window
1
[Interface]
2
Address= 10.77.0.3/32
3
PrivateKey= <手机私钥,不外传>
4
5
[Peer]
6
PublicKey= <VPS_PUBLIC_KEY>
7
Endpoint= <VPS_PUBLIC_IP>:51820
8
AllowedIPs= 10.77.0.0/24
9
PersistentKeepalive= 25
Do not set the phone's AllowedIPs to 0.0.0.0/0; the goal is only to manage the router.
3.5 Firewall
Router side: Put wg0 in a separate zone, deny by default, and allow only the phone to access the management ports.
VPS side: Allow forwarding and return packets for phone→router on wg0 → wg0, and deny other peers from reaching each other. How to write the rules depends on whether the VPS uses UFW, nftables, iptables-nft, or iptables-legacy, and whether Docker has taken over FORWARD. Start with a read-only audit:
Terminal window
1
sudoiptables-V
2
sudoiptables-nft-SFORWARD
3
sudoiptables-nft-SDOCKER-USER 2>/dev/null || true
4
sudonftlistruleset
If it is indeed Docker + iptables-nft and DOCKER-USER exists, you can use this limited-scope example:
These are runtime rules and will be lost on reboot; persist them according to your own firewall system. Do not iptables -F, and do not change FORWARD to ACCEPT globally.
When SSHing directly to the router from the VPS: For connections initiated from the VPS itself to the router, return packets go through the VPS's INPUT chain rather than FORWARD. If INPUT denies wg0 by default, you need to temporarily allow the router's return packets:
# Delete after use: replace -I INPUT 1 with -D INPUT
Allow only return packets for "established connections"; the router must not be able to initiate connections to the VPS. Delete the rule when done, or record it explicitly.
3.6 Verifying from a Cellular Network
wg show wg0 on both the router and the VPS show a recent handshake.
Turn off Wi-Fi on the phone, connect to WireGuard over cellular, and open http://10.77.0.2/cgi-bin/luci/ and the panel http://10.77.0.2:9090/ui/.
Confirm that accessing other home LAN addresses fails.
Retest after restarting the VPS, Docker, and the router separately. A successful handshake only proves key exchange; it does not prove that forwarding and the firewall both allow traffic.
WireGuard status on the router side; a Tencent Cloud server is used as the relay. The endpoint IP and peer public key have been masked.
4. Cross-Border Route Lag Troubleshooting
The most common complaint after deployment is “pages load, but videos stutter constantly.” This section covers my experience actually troubleshooting a Los Angeles CN2 GIA route.
4.1 Get Data First; Don’t Change Configs First
Test long-distance single-threaded downloads. Multi-threaded speed tests can mask problems; video playback is essentially a single connection, so test through OpenClash’s local port on the router:
Terminal window
1
# On the router, test single-thread speed via the OpenClash HTTP port, 5 times in a row
In testing, on the same route, single-threaded speed increased from about 41 KB/s to about 290 KB/s (during periods when packet loss was still present).
Congestion control and queueing on the server: bbr + fq
The node now uses bbr + fq, and cake on the ingress direction has been removed. The terminal styling is rendered; the content is real command output.
4.3 Don’t Do Rate Limiting/Shaping at the Server Ingress
I once tried adding cake rate limiting on the node’s ingress direction to “smooth” traffic, but it became the bottleneck instead. After removing it, under the same conditions, single-threaded speed recovered to about 7–8 MB/s with zero stuttering. Conclusion: when bandwidth is sufficient, don’t add ingress shaping on the node; if you need rate limiting, do it on the client side first (e.g., Hysteria2’s up/down) and set it based on measured values.
Five single-threaded speed tests during evening peak
Evening peak on 2026-11-12 at 19:40; five single-threaded tests at 5.12–6.48 MiB/s. The terminal styling is rendered; the content is real command output.
4.4 Still Occasional Stuttering After All Changes: Contact the Provider
If BBR is enabled and the configuration is correct, but a few connections still suddenly drop to tens of KB/s, organize the following evidence and submit a ticket (in the provider’s working language): test time (with time zone), single-threaded speed, mtr results, and retransmission data from ss. The actual cause I encountered was insufficient firewall performance in the data center; the provider recovered after a restart and arranged to replace the equipment.
5. Common Troubleshooting Reference Table
Symptom
Check First
Not Recommended
All networking drops after OpenClash starts
Whether dnsmasq-full is installed, DNS port, memory
Reinstalling the system outright
Rule changes do not take effect
Whether only one place in the config was changed; whether hot reload was performed
Repeatedly restarting the router
Pages load but videos stutter
Whether the platform’s CDN domains are missing from the rules; single-threaded speed
Looking only at multi-threaded results from speed test sites
Node speed fluctuates
ss retransmissions on the server, BBR, whether ingress rate limiting is present
Adding rate limiting without testing
WireGuard handshake fails
Whether the endpoint is resolved by fake-ip to a fake address
Disabling the firewall to troubleshoot
WireGuard handshake succeeds but access fails
VPS forwarding/INPUT rules, Docker backend, router zone
Setting all VPN input forwarding to ACCEPT
Stops working after reboot
Rule persistence, startup order
Treating “worked once” as verification of persistence
6. Maintenance, Backup, and Rollback
It is recommended to keep three types of backups, separate from public tutorials:
Factory partition backup: store offline and encrypted.
OpenWrt configuration: /etc/config, /etc/openclash/config/, /etc/wireguard. OpenClash configs contain node passwords and the controller secret, as sensitive as private keys.
VPS configuration: WireGuard, firewall rules, sysctl changes, and rollback commands.
Back up before every change, and after making changes, record “what was changed and how to roll back.”
Common read-only checks:
Terminal window
1
ubuscallsystemboard
2
ip-4routeshowdefault
3
ifstatuswan
4
wgshowwg0
5
pidofclash || pidofmihomo
6
free-m
7
df-h/overlay
7. Trade-offs of the Approach
Option
Pros
Cost
OpenClash + Meta kernel
Primary/backup failover, per-service routing, hot reload
Memory-hungry; rules must be trimmed on 256 MB machines
Two nodes, dual protocol on each
Automatically falls back to TCP when UDP is throttled; can switch over if a single node fails
Maintenance cost of two servers
Self-hosted WireGuard hub
Remote management even behind NAT, permissions can be narrowed
Complex interaction between the VPS firewall and Docker
Practical advice: Add only one component at a time, and verify and back up after each addition. Keep a separate LAN fallback entry point for both transparent proxying and remote management.
Update note: First published on 2026-11-12. The previous post (2026-11-02) covered flashing and HomeProxy; this one covers OpenClash, primary/backup lines, lag troubleshooting, and WireGuard coexisting with OpenClash. This article contains no actual server addresses, passwords, subscription links, or device identity information.