Jump to content
Not connected, Your IP: 18.226.17.251

Leaderboard


Popular Content

Showing content with the highest reputation on 07/29/22 in Posts

  1. 1 point
    Based on the articles above, suggested patch to Eddie source code (not tested): diff --git a/common/lang/inv.json b/common/lang/inv.json index cf2e13a..efeefab 100644 --- a/common/lang/inv.json +++ b/common/lang/inv.json @@ -413,6 +413,7 @@ "StatsVpnTotalUpload": "VPN Total Upload", "StatsVpnType": "VPN Type", "WindowsSettingsRouteOutEmptyList": "WARNING: not specified routes go outside the tunnel, but you did not specify any route. Continue?", + "WindowsSystemSessionEnding": "Received system-session-ending event (restart, shutdown or log off)", "CommandCancel": "Cancel", "CommandConnect": "Connect to a recommended server", "CommandConnectSubtitle": "or choose a specific server in 'Servers' tab.", @@ -541,4 +542,4 @@ "WindowsUnlockFirstAuth": "Enter your password to unlock profile", "WindowsUnlockTitle": "Unlock", "OsWindowsNetworkAdapterDnsDone": "DNS {1} of a network adapter forced ({2}, from {3} to {4})" -} \ No newline at end of file +} diff --git a/src/Lib.Forms/Forms/Main.cs b/src/Lib.Forms/Forms/Main.cs index 8ebd80f..5763a92 100644 --- a/src/Lib.Forms/Forms/Main.cs +++ b/src/Lib.Forms/Forms/Main.cs @@ -75,6 +75,9 @@ namespace Eddie.Forms.Forms private bool m_logNeedScrollBottom = false; + private const int WM_QUERYENDSESSION = 0x11; + private static bool isSystemSessionEnding = false; + public Main() { OnPreInitializeComponent(); @@ -94,6 +97,16 @@ namespace Eddie.Forms.Forms SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true); } + protected override void WndProc(ref System.Windows.Forms.Message m) + { + if (m.Msg == WM_QUERYENDSESSION) + { + Engine.Instance.Logs.Log(LogType.InfoImportant, LanguageManager.GetText("WindowsSystemSessionEnding")); + isSystemSessionEnding = true; + } + base.WndProc(ref m); + } + private void DoDispose(IDisposable o) { if (o != null) @@ -652,7 +665,8 @@ namespace Eddie.Forms.Forms e.Cancel = true; - if (Engine.Instance.AskExitConfirm()) + // If the system session is ending (restart/shutdown/logoff), do not inhibit it by creating popups. + if (!isSystemSessionEnding && Engine.Instance.AskExitConfirm()) { if (AskYesNo(LanguageManager.GetText("ExitConfirm")) != true) {
  2. 1 point
    for Asus merlin set WAN DNS to something other than the VPN DNS (10.4.0.1) and in the openvpn configuration set the DNS setting to exclusive. Then it'll switch to VPN DNS when the VPN connects. 10.4.0.1 won't work unless you're connected to VPN because 10.4.0.1 is only accessible through the VPN not from public.
×
×
  • Create New...