Tutorial ~18 min read

Fix Clash Meta IPv6 Issues: prefer-ipv6 and DNS Dual-Stack Troubleshooting (2026)

You flipped IPv6 on in Mihomo or ticked options that effectively prefer IPv6, and suddenly a slice of the web behaves worse than before—blank canvases in modern SPAs, long hangs on first paint, or odd “server not found” moments that disappear when IPv6 is rolled back. This article is narrowly focused: separating DNS dual-stack behavior (A versus AAAA, resolver policy, and GEO edges) from proxy exit realities (whether your outbound path can complete IPv6 at all), plus how FakeIP and TUN amplify or hide the mess. Bring logs; optimism without evidence is how profiles grow duplicate fixes that fight each other.

Clash Editorial Team Clash Meta · Mihomo · IPv6 · prefer-ipv6 · DNS · dual stack

Symptoms that point to IPv6 or dual-stack mismatch

There is no single universal error string. What people report after enabling IPv6 in Clash Meta tends to cluster into a few patterns. Some sites only break over HTTPS while plain HTTP redirects still work—often a sign the browser picked a different address family for the main document versus assets. Others show endless spinners on heavy front-ends because WebSocket or HTTP/3 attempts race down a path your tunnel does not handle symmetrically. A third pattern is regional: a streaming or shopping site loads, but the CDN edge is “wrong” for your account, which can follow DNS returning an optimized AAAA from a resolver that disagrees with your split rules.

Crucially, many of these cases are not “DNS leaks” in the classic sense. You can pass every leak-test badge and still experience dual-stack weirdness when prefer-ipv6 changes which record wins, or when the operating system’s Happy Eyeballs implementation deprioritizes a working family because latency looked better for a moment. That is why this guide pairs with the Meta core DNS leak prevention article but does not repeat it: here, the interesting failure is preferential ordering and cross-family consistency, not whether plaintext port 53 left the machine.

What prefer-ipv6 actually nudges

In Mihomo-compatible configurations, dns.prefer-ipv6 influences how the core thinks about address selection when both A and AAAA records exist. It is not a magic “IPv6 only” switch, and it does not fix a broken upstream by itself. Think of it as a bias: when multiple answers are valid, the resolver pipeline may surface IPv6 first or favor queries that make IPv6 easier to use downstream. When that bias collides with a proxy chain that assumes IPv4 end-to-end, you get brittle sites that “mostly work,” because some subresources still IPv4-hop correctly while primary connections stall on IPv6.

Separately, a top-level ipv6: true style toggle (exact naming depends on your profile template and core version—always cross-check exported YAML against release notes) advertises willingness to establish dual-stack outbounds. If your servers or routes only guarantee IPv4, turning this on expands the handshake surface area without guaranteeing success. The operator mistake is flipping both “DNS prefers IPv6” and “Outbound allows IPv6” in the same experimental session without watching one connection trace at a time.

Version discipline: Key names drift across Mihomo forks. Snapshots in this guide are illustrative; treat your exported config and the changelog as authoritative truth.

DNS dual-stack: why A/AAAA order matters

Public sites increasingly publish both record types. Dual-stack DNS means your resolver ecosystem must answer two parallel questions cleanly: what IPv4 does this name designate, and what IPv6, and under what latency and TTL constraints. Corporate networks and home routers sometimes ship split horizons where IPv6 answers come from ISP resolvers while your tunnel expects another region entirely. Mihomo mitigates that with policy knobs—nameserver-policy, conditional upstream lists, bootstrap resolvers—but only if they match how your rules categorize traffic afterward.

When prefer-ipv6 tips the scales toward IPv6-heavy answers without a symmetric route through your selected proxy outbound, browsers may still retry, but timeouts feel like “random broken pages.” Mobile tethering exacerbates this: IPv6 prefixes change frequently, firewall rules mutate, and a laptop that behaved on Ethernet suddenly misbehaves on a hotspot—all while YAML stayed identical.

CDN edges, ECS, and the wrong continent

Some resolvers attach ECS (Client Subnet) data to recursive queries so CDNs steer you closer. When your tunnel exit sits in Country A while ECS hints originate from Country B because the resolver saw your ISP’s view, authoritative answers may land on a contradictory edge. Turning on IPv6 can change ECS signaling paths subtly; the visible symptom mirrors split-routing drift: content loads technically, yet accounts or storefronts insist you are elsewhere. GEOIP-oriented rules (GEOIP/GEOSITE articles on this blog cover the broader layering) rely on coherent IP attribution—dual-stack turbulence makes GEO buckets lie gently enough that you chase ghosts in subscription lists rather than resolver policy.

FakeIP, sniffer cues, and why IPv6 feels “different”

In FakeIP mode (enhanced-mode: fake-ip), the kernel hands clients ephemeral addresses mapped to tracked domains—usually from a dedicated IPv4-like range—and uses internal machinery to reconcile the real outbound path later. Profiles often prioritize tuning IPv4-centric fake-ip-range while IPv6 traverses alternate logic. When you widen dual-stack ambition without revisiting fake-ip-filter, sniffer settings, or related exceptions, niche apps may still insist on fetching literal AAAA records through OS caches that bypass what you assumed was unified.

If troubleshooting drifts into LAN or intranet exclusions, consolidate with Configure Clash Meta fake-ip-filter; that page underscores how IPv6-only quirks can linger even after IPv4 paths look clean. Translation: do not treat FakeIP rollback as heroic—first confirm whether exclusions or sniffer interplay already explain split behavior before you dismantle FakeIP wholesale.

System proxy versus TUN: capture completeness

Many symptoms attributed to IPv6 are actually unresolved captures gaps. A browser obeying PAC or system proxy may still initiate parallel DNS lookups that collide with resolver policy; TUN expands interception but introduces its own prerequisites: interface ordering, forbidden routes left behind by VPNs you forgot to unregister, or missing DNS hijack redirection. Pair this section with Complete TUN Mode Setup Guide for Clash Verge Rev, then verify whether UDP/53 escapes still occur when IPv6 transitions happen (sleep/wake, switching adapters). Without capture completeness, blaming IPv6 is guesswork layered on confusion.

1Ordered triage: stop thrashing YAML

Use a literal checklist and change one knob per pass. Humans who flip five toggles simultaneously report success because the last variable accidentally compensated for the fourth—until the next reboot.

  1. Baseline reproduce: pick one stubborn URL, reproduce in a private browsing window while logging connections. Note whether QUIC is active; HTTP/3 can exaggerate timeouts when ICMP or path MTU behaves badly on IPv6 legs.
  2. Isolation test: temporarily set dns.prefer-ipv6 to false while leaving other DNS structure intact—does the symptom disappear? If yes, you likely have resolver ordering or egress mismatch rather than node failure.
  3. Outbound reality: if your profile exposes ipv6:-style controls, temporarily disable outbound IPv6 and retest identical URLs. Regression here points to proxy-side IPv6 support or routing quirks, not resolver aesthetics.
  4. Compare resolver policies: align nameserver-policy splits with GEO rules; avoid sending domestic-targeted lookups through tunnels that ECS-scramble your apparent region.
  5. FakeIP audit: confirm fake-ip-filter lists include anything IPv6-aware apps require; reconcile sniffer settings if domain-driven rules silently miss QUIC flows.
  6. TUN/DNS hijack: after reading the TUN guide, confirm hijack scope covers tethering/virtual NICs introduced while testing hotspots.
  7. Revert path: document the minimal rollback YAML so panic edits do not snowball.

Illustrative rollback snippet (adjust to your fork)

Profiles differ; treat this skeleton as conversational shorthand, not a universal patch.

dns:
  enable: true
  enhanced-mode: fake-ip
  prefer-ipv6: false
ipv6: false

Pair toggles thoughtfully: flipping only prefer-ipv6 while leaving aggressive outbound IPv6 on may yield partial fixes; symmetrical experiments reduce narrative debt when you escalate to upstream issue trackers.

Router-level IPv6: LAN clients may still obtain global IPv6 from your gateway even when Mihomo biases DNS toward IPv4. If your goal is deterministic lab conditions, correlate OS interface state with Mihomo logs before declaring victory.

Outbound nodes and ICMP realities

Some proxy transports assume IPv4. Even when Mihomo logically supports IPv6, specific groups or providers may degrade when ICMPv6 signaling or fragmentation differs from your last-mile ISP path. Symptoms mirror generic packet loss except they correlate with IPv6-heavy destinations. Narrow tests—single domain, steady TCP vs QUIC—expose whether you need smarter group selection versus DNS surgery.

Logging discipline matters: skim for handshake retries, stalled TLS negotiation, or repeated attempts after switching address families. The article Clash Meta logs: connection reset by time and rules explains how timestamps and rule precedence align with resets; combine that framing with IPv6 toggling so you correlate policy hits with failures instead of blaming nebulous “instability.”

When the culprit is probably not IPv6

Certificate pinning issues, captive portals, captive DNS on flights, captive corporate proxies—these imitate dual-stack breakage. Likewise, QUIC blockages masquerade as intermittent blank pages because browsers silently downgrade at different thresholds. Spend ten minutes distinguishing transport symptoms before rewriting DNS policy; you will owe calmer prose to collaborators who inherit your YAML later.

Downloads, documentation, upstream source

Installers and UX-stable builds belong on our official download page; treat Git repositories as transparency for source review and issue linkage, distinct from grabbing daily artifacts when you merely need reproducible binaries. Operational vocabulary should stay aligned with our configuration documentation hub so your team translates settings across machines without synonym drift (“mixed port,” “system proxy,” “dialer,” etc.).

Closing

Clash Meta shines when observable state matches declarative YAML: resolver behavior, outbound capability, FakeIP/sniffer alignment, and capture mode cooperating on one timeline. Prefer IPv6 and DNS dual-stack are powerful when your network and proxies truly meet them—but they amplify inconsistency mercilessly when any layer lies. Narrow reproduction, symmetrical toggles, and log-grounded rollback beat cargo-cult profile merges every time—and they keep weekends intact.

For day-to-day client workflows that tolerate experimentation without juggling raw binaries constantly, graphical builds that bundle Meta core cleanly matter as much as transport theory—which is exactly why picking a credible installer path first still wins over chasing random forks.

Download Clash for free and experience the difference

Clash Meta / Mihomo Client IPv6 · Dual-stack

Sites breaking after enabling prefer-ipv6 usually trace to DNS dual-stack inconsistency; the log timeline and rule-match trace isolate whether the problem is a routing rule, a policy-group selection, or a resolver gap.

Dual-stack alignment

Keep IPv4 and IPv6 paths consistent

Log-driven root cause

Timeline + rule-match trace for fast isolation

prefer-ipv6 control

Enable per-need without full dual-stack commitment

DNS guides

Pair with FakeIP and DoH articles on this site

Previous & Next

Related Reading

IPv6 or dual-stack acting up?

Get Clash from our download page, then align Mihomo resolver policy with your tunnel and outbound IPv6 capability—fewer mystery blank pages after toggling prefer-ipv6 or dual-stack DNS.

Download Free Client