线路连接实验室
客户端下载住宅IP与VPS14 篇使用指南English阅读测评逐层排查连接问题

Router & Firmware Configuration · Technical Guide

OpenClash & Mihomo AnyTLS Troubleshooting: Subscription Parsing, udp: true YAML Error & Fake-IP DNS Fix

Running Mihomo or OpenClash on OpenWrt routers frequently encounters YAML subscription parser failures when custom protocols like AnyTLS or Hysteria2 are included. This guide covers core updating, subconverter rule injection, proper fake-ip TUN stack settings, and preventing domestic DNS poisoning.

Last Verified: 2026-11-12
Key Takeaways

Quick Conclusion

OpenClash issues with new protocols typically stem from outdated subconverter services stripping unknown YAML keys (such as type: anytls or hysteria2 params), or from dnsmasq conflicts when configuring Fake-IP. Upgrading OpenClash to the latest Mihomo Meta kernel, disabling external subscription converters for raw configs, and reserving port 7874 for router DNS redirection completely resolves connection failures.

01
Issue Analysis

Common Symptoms & Checkpoints

SymptomLikely LayerFirst Step
OpenClash subscription updates successfully but AnyTLS nodes are missingL2 Parser / Remote Subscription Converter Stripping Fields

Disable online subconverter in OpenClash settings and download raw configuration directly.

OpenWrt router loses internet entirely after enabling OpenClashL4 System / dnsmasq and Core Port 53 Conflict

Change OpenClash DNS mode to Fake-IP (TUN) and verify dnsmasq forwarding points to 127.0.0.1:7874.

UDP gaming or voice calls drop constantly across routerL3 Protocol Core / Missing udp: true in Node YAML

Add udp: true to node definition and verify firewall allows UDP forwarding on WAN.

02
Implementation Steps

Step-by-Step Configuration

  1. 01
    Upgrade OpenClash to Latest Mihomo Meta Core

    Navigate to OpenClash > Plugin Settings > Version Update. Select Meta Core and update to the current release to guarantee AnyTLS and Reality protocol support.

  2. 02
    Configure Fake-IP Mode and Router DNS Forwarding

    In OpenClash > DNS Settings, configure the Fake-IP TUN architecture:

    dns:
      enable: true
      listen: 127.0.0.1:7874
      ipv6: false
      enhanced-mode: fake-ip
      fake-ip-range: 198.18.0.1/16
      nameserver:
        - 119.29.29.29
        - 223.5.5.5
      fallback:
        - https://1.1.1.1/dns-query
        - https://8.8.8.8/dns-query
  3. 03
    Inject Raw AnyTLS Proxy Block

    If your subscription provider uses AnyTLS, ensure the node YAML block retains the correct core structure without third-party converter alteration.

  4. 04
    Test WAN Leakage and DNS Resolution

    SSH into your OpenWrt router and run nslookup google.com 127.0.0.1:7874. The returned IP should fall strictly within the 198.18.0.0/16 Fake-IP subnet.

03
Questions

Frequently Asked Questions

Should I choose Fake-IP or Redir-Host mode on OpenWrt?+

Fake-IP is strongly recommended for modern OpenWrt setups because it eliminates client DNS wait time and prevents DNS pollution entirely. Redir-Host is only needed for legacy appliances that reject synthetic IPs.

Why does my router CPU spike to 100% under high bandwidth?+

Enable software and hardware flow offloading under OpenWrt Network > Firewall, and use Mihomo TUN with gVisor or system stack.