From 41d03d1856a5b16521610792601a20fb1195418e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=81=E3=82=BB?= <123655015+chise0713@users.noreply.github.com> Date: Tue, 20 Aug 2024 07:21:19 +0800 Subject: [PATCH] Wireguard inbound: Fix no route when bind to interface (#3698) --- proxy/wireguard/tun_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxy/wireguard/tun_linux.go b/proxy/wireguard/tun_linux.go index 88446339..22c638d3 100644 --- a/proxy/wireguard/tun_linux.go +++ b/proxy/wireguard/tun_linux.go @@ -200,6 +200,9 @@ func createKernelTun(localAddresses []netip.Addr, mtu int, handler promiscuousMo r := netlink.NewRule() r.Table, r.Family, r.Src = ipv6TableIndex, unix.AF_INET6, addr.IPNet out.rules = append(out.rules, r) + r = netlink.NewRule() + r.Table, r.Family, r.OifName = ipv6TableIndex, unix.AF_INET6, n + out.rules = append(out.rules, r) } for _, addr := range out.linkAddrs {