diff --git a/shadowsocks-csharp/Controller/ShadowsocksController.cs b/shadowsocks-csharp/Controller/ShadowsocksController.cs index d25cc494..6daaa68a 100644 --- a/shadowsocks-csharp/Controller/ShadowsocksController.cs +++ b/shadowsocks-csharp/Controller/ShadowsocksController.cs @@ -89,10 +89,13 @@ namespace Shadowsocks.Controller StartTrafficStatistics(61); } - public void Start() + public void Start(bool regHotkeys = true) { Reload(); - HotkeyReg.RegAllHotkeys(); + if (regHotkeys) + { + HotkeyReg.RegAllHotkeys(); + } } protected void ReportError(Exception e) diff --git a/shadowsocks-csharp/Program.cs b/shadowsocks-csharp/Program.cs index 50f56d25..551b9082 100755 --- a/shadowsocks-csharp/Program.cs +++ b/shadowsocks-csharp/Program.cs @@ -127,7 +127,7 @@ namespace Shadowsocks Thread.Sleep(10 * 1000); try { - MainController.Start(); + MainController.Start(false); Logging.Info("controller started"); } catch (Exception ex)