From 0ee4798518f4648e740640f0fcd45d19967b542c Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sat, 14 Nov 2026 12:02:15 +0800 Subject: [PATCH] fix(mihomo): rules for linkedin --- modules/nixos/desktop/networking/mihomo/README.md | 3 +++ modules/nixos/desktop/networking/mihomo/policy.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/modules/nixos/desktop/networking/mihomo/README.md b/modules/nixos/desktop/networking/mihomo/README.md index 0ea09dab..9482de5a 100644 --- a/modules/nixos/desktop/networking/mihomo/README.md +++ b/modules/nixos/desktop/networking/mihomo/README.md @@ -150,6 +150,9 @@ and `policy.yaml` bypasses proxy only for that observed probe, not game CDNs or broad vendor domains. Verify future probes in `/connections` and add only confirmed hosts. Reference: [HoyoPlay API endpoints](https://gist.github.com/DynamiByte/0ad250bbe1930e2736a6d4e6e842bcb2). +- LinkedIn resolves to a Azure China IP and redirect to `linkedin.cn`, so `policy.yaml` pins + `GEOSITE,linkedin` to `PROXY`; a `no-resolve`-less imported ipcidr rule-set shadows it, so such a + host overrides in `sources.yaml`. - Rule payloads are bare domains: `DOMAIN-SUFFIX,https://qlogo.cn` is invalid. - On a systemd-resolved host, sing-tun normally points resolved at the TUN DNS with `resolvectl`. The nixpkgs `DynamicUser` sandbox cannot make those privileged D-Bus changes, so resolved's own diff --git a/modules/nixos/desktop/networking/mihomo/policy.yaml b/modules/nixos/desktop/networking/mihomo/policy.yaml index 9f4b597a..d5341576 100644 --- a/modules/nixos/desktop/networking/mihomo/policy.yaml +++ b/modules/nixos/desktop/networking/mihomo/policy.yaml @@ -111,6 +111,9 @@ rules: - IP-ASN,32590,DIRECT,no-resolve - DOMAIN,launcher-webstatic.hoyoverse.com,DIRECT + # LinkedIn resolves to a CN IP; GEOIP,CN below would send it DIRECT (302 to linkedin.cn). + - GEOSITE,linkedin,PROXY + # CN consumer services: proxied they fail in ways that look like app bugs -- # WeChat pictures spin, JD and Taobao product images go blank. Much of it is # served over bare CDN IPs and IPv6, so pin the whole category DIRECT.