diff --git a/shadowsocks-csharp/Controller/Service/Sip003Plugin.cs b/shadowsocks-csharp/Controller/Service/Sip003Plugin.cs index ab6f5f254..48512c03d 100644 --- a/shadowsocks-csharp/Controller/Service/Sip003Plugin.cs +++ b/shadowsocks-csharp/Controller/Service/Sip003Plugin.cs @@ -94,6 +94,11 @@ public bool StartIfNeeded() return false; } + if (!File.Exists(_pluginProcess.StartInfo.FileName)) + { + throw new FileNotFoundException(I18N.GetString("Cannot find the plugin program file"), _pluginProcess.StartInfo.FileName); + } + var localPort = GetNextFreeTcpPort(); LocalEndPoint = new IPEndPoint(IPAddress.Loopback, localPort);