From 5742f7fb63b5dc16a750cfbf9857b7a8c18bccac Mon Sep 17 00:00:00 2001 From: Konstantin Passig PC <2002erdi@gmail.com> Date: Tue, 25 Aug 2026 18:12:53 +0200 Subject: [PATCH] vpn: diagnose includes host wg interfaces + NAT counters to detect same-key conflicts --- yt_downloader/vpn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yt_downloader/vpn.py b/yt_downloader/vpn.py index 626ae77..ab808cc 100644 --- a/yt_downloader/vpn.py +++ b/yt_downloader/vpn.py @@ -255,6 +255,10 @@ def _diagnose(cfg) -> str: ("wg", ["ip", "netns", "exec", ns, "wg", "show", iface]), ("routes", ["ip", "netns", "exec", ns, "ip", "route", "show", "default"]), ("rules", ["ip", "netns", "exec", ns, "ip", "rule", "show"]), + ("host wg interfaces", ["sh", "-c", + "for i in $(wg show interfaces 2>/dev/null); do " + "echo \"== $i ==\"; wg show $i public-key 2>/dev/null; done"]), + ("host NAT", ["iptables", "-t", "nat", "-L", "POSTROUTING", "-n", "-v"]), ): rc, out = _sudo_out(args) parts.append(f"--- {title} ---\n{out or '(none)'}")