Force Proxy to any Windows/MacOS/Linux Application TCP and UDP traffic
C ccybersecurityhttp3httpproxylinuxlinux-proxymacosmacos-appmacos-proxyproxifierproxifier-alternativeproxyclienttcpthick-clientudpwindivertwindows
#97 - filter existing direct connection log
AnoF-Cyberb1f6a0e184dc
diff --git a/Windows/gui/ViewModels/MainWindowViewModel.cs b/Windows/gui/ViewModels/MainWindowViewModel.csindex 8fad1a9..0fa3f9b 100644--- a/Windows/gui/ViewModels/MainWindowViewModel.cs+++ b/Windows/gui/ViewModels/MainWindowViewModel.cs@@ -319,7 +319,18 @@ public class MainWindowViewModel : ViewModelBaseset{if (SetProperty(ref _hideDirectConnections, value))+ {+ // refilter the existing log immediately+ if (value)+ {+ _connectionsLog = StripDirectLines(_connectionsLog);+ FilteredConnectionsLog = null!;+ FilteredConnectionsLog = string.IsNullOrWhiteSpace(_connectionsSearchText)+ ? _connectionsLog+ : FilterLog(_connectionsLog, _connectionsSearchText);+ }SaveCurrentProfileAsync();+ }}}@@ -877,6 +888,23 @@ public class MainWindowViewModel : ViewModelBasereturn sb.ToString();}+ private string StripDirectLines(string log)+ {+ if (string.IsNullOrEmpty(log))+ return log;++ var sb = new StringBuilder(log.Length);+ foreach (var line in log.Split('\n'))+ {+ if (!line.Contains(" via Direct", StringComparison.OrdinalIgnoreCase))+ {+ sb.Append(line);+ sb.Append('\n');+ }+ }+ return sb.ToString();+ }+private void LoadConfiguration(){try