v1.0.4 -- "那些过去,从未过去。"
-
chore(release): bump version to 1.0.4
-
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
-
Claude-Session: https://claude.ai/code/session_01YWcTvHimUrxTUtVBRVTcZn
-
fix(tun): stop DNS and WebRTC leaking the real address
-
With the virtual adapter on, DNS queries and WebRTC candidates still
-
exposed the real address. mihomo implements the defences for both, but
-
the app could not reach them: the Tun model, the config writer and the
-
Go bridge each carried the same six tun fields, so strict-route had no
-
way out of the app.
-
Add strict-route, on by default. On Windows sing-tun installs WFP
-
filters that permit only the tun interface and this process and block
-
remote port 53 everywhere else, which is what Windows' multihomed name
-
resolution needs; on Linux it adds the unreachable ip rules.
-
Make the tun carry IPv6. mihomo clears tun.inet6-address whenever ipv6
-
is false (config.parseIPV6), so a tun that does not take over IPv6
-
leaves the system routing it out of the physical interface. Force ipv6
-
on whenever the tun is enabled and write inet6-address explicitly.
-
Whether AAAA is resolved stays with dns.ipv6, so this does not change
-
which address family applications prefer.
-
Both settings also travel through the bridge, because core_manager
-
patches the running config instead of rewriting the profile: enabling
-
the tun after launch would otherwise recreate it without the IPv6
-
address it needs.
-
Add dns.fake-ip-range6 and tie it to dns.ipv6. Under fake-ip, AAAA is
-
answered by the withFakeIP middleware, which returns an empty answer
-
when there is no v6 pool and never reaches the dns.ipv6 check in
-
withResolver, so that switch did nothing in the default mode. It now
-
provisions the pool. Hosts without global IPv6 are unaffected:
-
parseIPV6 runs before parseDNS and parseTun and clears both the v6 pool
-
and the tun address.
-
Verified by parsing the generated config with mihomo's own config.Parse
-
in both environments. With IPv6 the tun keeps fdfe:dcba:9876::1/126 and
-
FakeIPPool6 is created; without it both are dropped and parsing still
-
succeeds.
-
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
-
Claude-Session: https://claude.ai/code/session_01YWcTvHimUrxTUtVBRVTcZn
Download based on your OS: