feat(wechat): native nixpkgs package with app-scoped data (#492)

Switch to the native deb package from nixpkgs-patched (#560225), remove the AppImage/FHS bwrap layer, and enable native Wayland while keeping the X11 fallback.

Keep only WeChat state under one app-scoped HOME and bind the host Documents and Downloads directories like the other desktop apps. User-selected files also go through the XDG FileChooser portal. Remove the launcher, activation script, and compatibility symlinks.

Assisted-by: DeepSeek Harness (deepseek-flash)
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-11-01 00:09:27 +08:00
1 parent 30cb22500f
commit ccffddc864
14 files changed
+49 -220

No files matched your search

@@ -64,8 +64,8 @@ still reaches the core.
The gateway (`suzi`, not a host in this flake) runs the same config with a fixed set of deltas --
`gateway-config.nu` renders it from the same `sources.yaml` and `policy.yaml`. The gateway uses
nftables TProxy, disables the desktop TUN auto-route, and uses `fake-ip` DNS with `dns.ipv6: false`:
LAN clients receive fake A mappings so mihomo retains the domain for routing and sniffing while their
traffic uses the working IPv4 TProxy path. The gateway withholds AAAA records because LAN IPv6
LAN clients receive fake A mappings so mihomo retains the domain for routing and sniffing while
their traffic uses the working IPv4 TProxy path. The gateway withholds AAAA records because LAN IPv6
transparent handling is unreliable on this gateway. Its output carries the subscriptions and the
private domains, so never commit it; the secret is filled in on the box, not here. Its binary is a
static release build under `/usr/local/bin`, not a package: update it by hand, validate the live
@@ -118,8 +118,8 @@ targets instead of writing a config the core rejects.
- WeChat resolves for itself, but its queries still cross the TUN, so `dns-hijack: any:53` catches
them and the fake-ip table hands the name back to the rules: `mmbiz.qpic.cn` measured DIRECT.
`multimedia.nt.qq.com.cn` stays in `fake-ip-filter` for the same reason. The exclude-process fix
that won clash-verge-rev#1762 is not available here: `hardening/bwraps/wechat.nix` sets
`unsharePid = true` and the sandbox reports uid 0, so no process name resolves.
that won clash-verge-rev#1762 is not available here: nixpak unshares the PID namespace and the
sandbox reports uid 0, so no process name resolves.
- `find-process-mode: off` unless `PROCESS-*` rules or `tun_exclude_process` need it.
- `tun_exclude_address`: a destination that can never be a proxy target should not pay a fake-ip
round trip -- RFC1918, RFC 6598's `100.64.0.0/10` (where Tailscale addresses come from),