From 00268d67fa0d37214bf80c945133033fb10fe327 Mon Sep 17 00:00:00 2001 From: ChsBuffer <33744752+chsbuffer@users.noreply.github.com> Date: Tue, 4 May 2021 00:24:09 +0800 Subject: [PATCH] TUNController: check Interop Init() return value. when false, throws MessageException --- Netch/Controllers/TUNController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Netch/Controllers/TUNController.cs b/Netch/Controllers/TUNController.cs index e96ec805..fb0dc513 100644 --- a/Netch/Controllers/TUNController.cs +++ b/Netch/Controllers/TUNController.cs @@ -89,7 +89,8 @@ namespace Netch.Controllers #endregion Global.Logger.Debug("tun2socks init"); - Init(); + if (!Init()) + throw new MessageException("tun2socks start failed, reboot your system and start again."); _tunAdapter = new TunAdapter(); switch (mode.Type)