From a401b21f3d327c9673307d78418363c17e01098a Mon Sep 17 00:00:00 2001 From: bradleydiggs <62714511+bradleydiggs@users.noreply.github.com> Date: Thu, 14 Jan 2021 02:45:42 -0600 Subject: [PATCH] blacklists wg# (WireGuard) interfaces by default On certain OSes (Linux & Apple) tun#, tap#, and of course zt# are blacklisted by default, this adds wg# to the list as WireGuard is a similar popular service with wg# being the default adapter name(s) by convention. --- service/OneService.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/service/OneService.cpp b/service/OneService.cpp index 8c0e64e97..7447d6387 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -3017,6 +3017,7 @@ public: if ((ifname[0] == 'z') && (ifname[1] == 't')) return false; // sanity check: zt# if ((ifname[0] == 't') && (ifname[1] == 'u') && (ifname[2] == 'n')) return false; // tun# is probably an OpenVPN tunnel or similar if ((ifname[0] == 't') && (ifname[1] == 'a') && (ifname[2] == 'p')) return false; // tap# is probably an OpenVPN tunnel or similar + if ((ifname[0] == 'w') && (ifname[1] == 'g')) return false; // wg# is probably a WireGuard tunnel or similar #endif #ifdef __APPLE__ @@ -3025,6 +3026,7 @@ public: if ((ifname[0] == 'z') && (ifname[1] == 't')) return false; // sanity check: zt# if ((ifname[0] == 't') && (ifname[1] == 'u') && (ifname[2] == 'n')) return false; // tun# is probably an OpenVPN tunnel or similar if ((ifname[0] == 't') && (ifname[1] == 'a') && (ifname[2] == 'p')) return false; // tap# is probably an OpenVPN tunnel or similar + if ((ifname[0] == 'w') && (ifname[1] == 'g')) return false; // wg# is probably a WireGuard tunnel or similar if ((ifname[0] == 'u') && (ifname[1] == 't') && (ifname[2] == 'u') && (ifname[3] == 'n')) return false; // ... as is utun# #endif