Skip to content

Force Proxy to any Windows/MacOS/Linux Application TCP and UDP traffic

#47 - added Windows Startup option

Sourav Kalala20163c867e5
diff --git a/Windows/cli/ProxyBridge.CLI.csproj b/Windows/cli/ProxyBridge.CLI.csproj
index c05513a..a2cee8a 100644
--- a/Windows/cli/ProxyBridge.CLI.csproj
+++ b/Windows/cli/ProxyBridge.CLI.csproj
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>ProxyBridge_CLI</AssemblyName>
- <Version>3.0.0</Version>
+ <Version>4.0.0</Version>
<PublishAot>true</PublishAot>
<InvariantGlobalization>false</InvariantGlobalization>
<SelfContained>true</SelfContained>
diff --git a/Windows/gui/App.axaml b/Windows/gui/App.axaml
index 089c559..91f7ac2 100644
--- a/Windows/gui/App.axaml
+++ b/Windows/gui/App.axaml
@@ -4,6 +4,7 @@
RequestedThemeVariant="Dark">
<Application.Styles>
<FluentTheme />
+ <StyleInclude Source="/Styles/SharedStyles.axaml"/>
</Application.Styles>
<TrayIcon.Icons>
diff --git a/Windows/gui/App.axaml.cs b/Windows/gui/App.axaml.cs
index 6747264..f5cf384 100644
--- a/Windows/gui/App.axaml.cs
+++ b/Windows/gui/App.axaml.cs
@@ -12,9 +12,10 @@ namespace ProxyBridge.GUI;
public class App : Application
{
+ public static bool StartMinimized { get; set; }
private EventWaitHandle? _showWindowEvent;
private CancellationTokenSource? _eventListenerCts;
- private const string EventName = "Global\\ProxyBridge_ShowWindow_Event_v3.0";
+ private const string EventName = "Global\\ProxyBridge_ShowWindow_Event_v4.0";
public override void Initialize() => AvaloniaXamlLoader.Load(this);
@@ -24,6 +25,12 @@ public class App : Application
{
desktop.MainWindow = new MainWindow { DataContext = new MainWindowViewModel() };
+ if (StartMinimized)
+ {
+ desktop.MainWindow.WindowState = WindowState.Minimized;
+ desktop.MainWindow.ShowInTaskbar = false;
+ }
+
try
{
_showWindowEvent = new EventWaitHandle(false, EventResetMode.AutoReset, EventName);
@@ -70,6 +77,7 @@ public class App : Application
var mainWindow = desktop.MainWindow;
if (mainWindow != null)
{
+ mainWindow.ShowInTaskbar = true;
mainWindow.Show();
mainWindow.WindowState = WindowState.Normal;
mainWindow.Activate();
diff --git a/Windows/gui/Common/RelayCommand.cs b/Windows/gui/Common/RelayCommand.cs
new file mode 100644
index 0000000..f940cd3
--- /dev/null
+++ b/Windows/gui/Common/RelayCommand.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Windows.Input;
+
+namespace ProxyBridge.GUI.Common;
+
+public class RelayCommand : ICommand
+{
+ private readonly Action _execute;
+ private readonly Func<bool>? _canExecute;
+
+ public RelayCommand(Action execute, Func<bool>? canExecute = null)
+ {
+ _execute = execute ?? throw new ArgumentNullException(nameof(execute));
+ _canExecute = canExecute;
+ }
+
+ public event EventHandler? CanExecuteChanged;
+
+ public bool CanExecute(object? parameter) => _canExecute?.Invoke() ?? true;
+
+ public void Execute(object? parameter) => _execute();
+
+ public void RaiseCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty);
+}
+
+public class RelayCommandWithParameter<T> : ICommand
+{
+ private readonly Action<T> _execute;
+ private readonly Func<T, bool>? _canExecute;
+
+ public RelayCommandWithParameter(Action<T> execute, Func<T, bool>? canExecute = null)
+ {
+ _execute = execute ?? throw new ArgumentNullException(nameof(execute));
+ _canExecute = canExecute;
+ }
+
+ public event EventHandler? CanExecuteChanged;
+
+ public bool CanExecute(object? parameter)
+ {
+ if (parameter is T typedParameter)
+ return _canExecute?.Invoke(typedParameter) ?? true;
+ return false;
+ }
+
+ public void Execute(object? parameter)
+ {
+ if (parameter is T typedParameter)
+ _execute(typedParameter);
+ }
+
+ public void RaiseCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty);
+}
diff --git a/Windows/gui/Program.cs b/Windows/gui/Program.cs
index 255fe87..a66774e 100644
--- a/Windows/gui/Program.cs
+++ b/Windows/gui/Program.cs
@@ -7,8 +7,8 @@ namespace ProxyBridge.GUI;
class Program
{
private static Mutex? _instanceMutex;
- private const string MutexName = "Global\\ProxyBridge_SingleInstance_Mutex_v3.0";
- private const string EventName = "Global\\ProxyBridge_ShowWindow_Event_v3.0";
+ private const string MutexName = "Global\\ProxyBridge_SingleInstance_Mutex_v4.0";
+ private const string EventName = "Global\\ProxyBridge_ShowWindow_Event_v4.0";
[STAThread]
public static void Main(string[] args)
@@ -23,6 +23,7 @@ class Program
try
{
+ App.StartMinimized = args.Length > 0 && args[0] == "--minimized";
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
finally
diff --git a/Windows/gui/ProxyBridge.GUI.csproj b/Windows/gui/ProxyBridge.GUI.csproj
index af1bb85..e0ce3f7 100644
--- a/Windows/gui/ProxyBridge.GUI.csproj
+++ b/Windows/gui/ProxyBridge.GUI.csproj
@@ -7,9 +7,15 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<AssemblyName>ProxyBridge</AssemblyName>
<RootNamespace>ProxyBridge.GUI</RootNamespace>
- <Version>3.0.0</Version>
+ <Version>4.0.0</Version>
+ <AssemblyVersion>4.0.0</AssemblyVersion>
+ <FileVersion>4.0.0</FileVersion>
<ApplicationIcon>Assets\logo.ico</ApplicationIcon>
- <!-- Native AOT Configuration -->
+ <Company>InterceptSuite</Company>
+ <Product>ProxyBridge</Product>
+ <Copyright>Copyright © 2026 InterceptSuite</Copyright>
+ <Description>Universal proxy client for Windows applications</Description>
+ <NeutralLanguage>en-US</NeutralLanguage>
<PublishAot>true</PublishAot>
<InvariantGlobalization>false</InvariantGlobalization>
<IlcOptimizationPreference>Speed</IlcOptimizationPreference>
diff --git a/Windows/gui/Resources/Resources.Designer.cs b/Windows/gui/Resources/Resources.Designer.cs
index d964c9b..4d947af 100644
--- a/Windows/gui/Resources/Resources.Designer.cs
+++ b/Windows/gui/Resources/Resources.Designer.cs
@@ -104,6 +104,12 @@ namespace ProxyBridge.GUI.Resources {
}
}
+ internal static string MenuRunAtStartup {
+ get {
+ return ResourceManager.GetString("MenuRunAtStartup", resourceCulture);
+ }
+ }
+
/// <summary>
/// Looks up a localized string similar to Language.
/// </summary>
diff --git a/Windows/gui/Resources/Resources.resx b/Windows/gui/Resources/Resources.resx
index 658c3f5..67fe3cc 100644
--- a/Windows/gui/Resources/Resources.resx
+++ b/Windows/gui/Resources/Resources.resx
@@ -32,6 +32,9 @@
<data name="MenuCloseToTray" xml:space="preserve">
<value>Close to System Tray</value>
</data>
+ <data name="MenuRunAtStartup" xml:space="preserve">
+ <value>Run at Startup</value>
+ </data>
<data name="MenuLanguage" xml:space="preserve">
<value>Language</value>
</data>
diff --git a/Windows/gui/Resources/Resources.zh.resx b/Windows/gui/Resources/Resources.zh.resx
index f3fcabb..40d1497 100644
--- a/Windows/gui/Resources/Resources.zh.resx
+++ b/Windows/gui/Resources/Resources.zh.resx
@@ -31,8 +31,9 @@
</data>
<data name="MenuCloseToTray" xml:space="preserve">
<value>关闭到系统托盘</value>
- </data>
- <data name="MenuLanguage" xml:space="preserve">
+ </data> <data name="MenuRunAtStartup" xml:space="preserve">
+ <value>开机启动</value>
+ </data> <data name="MenuLanguage" xml:space="preserve">
<value>语言</value>
</data>
<data name="MenuAbout" xml:space="preserve">
diff --git a/Windows/gui/Services/Loc.cs b/Windows/gui/Services/Loc.cs
index 85cb1d0..b11895a 100644
--- a/Windows/gui/Services/Loc.cs
+++ b/Windows/gui/Services/Loc.cs
@@ -43,6 +43,7 @@ public class Loc : INotifyPropertyChanged
public string MenuDnsViaProxy => Resources.Resources.MenuDnsViaProxy;
public string MenuSettings => Resources.Resources.MenuSettings;
public string MenuCloseToTray => Resources.Resources.MenuCloseToTray;
+ public string MenuRunAtStartup => Resources.Resources.MenuRunAtStartup;
public string MenuLanguage => Resources.Resources.MenuLanguage;
public string MenuAbout => Resources.Resources.MenuAbout;
public string MenuAboutProxyBridge => Resources.Resources.MenuAboutProxyBridge;
diff --git a/Windows/gui/Services/SettingsService.cs b/Windows/gui/Services/SettingsService.cs
index 6dc21f1..6e51756 100644
--- a/Windows/gui/Services/SettingsService.cs
+++ b/Windows/gui/Services/SettingsService.cs
@@ -2,6 +2,7 @@ using System;
using System.IO;
using System.Text.Json;
using System.Text.Json.Serialization;
+using Microsoft.Win32;
namespace ProxyBridge.GUI.Services;
@@ -52,7 +53,61 @@ public class SettingsService
}
catch
{
- // silently fail
+ }
+ }
+
+ public void SetStartupWithWindows(bool enable)
+ {
+ const string keyName = "ProxyBridge";
+ const string runKey = @"Software\Microsoft\Windows\CurrentVersion\Run";
+ const string approvedKey = @"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run";
+
+ try
+ {
+ using var key = Registry.CurrentUser.OpenSubKey(runKey, true);
+ if (key == null) return;
+
+ if (enable)
+ {
+ var exePath = Environment.ProcessPath;
+ if (exePath != null)
+ {
+ key.SetValue(keyName, $"\"{exePath}\" --minimized");
+
+ using var approvedKeyHandle = Registry.CurrentUser.CreateSubKey(approvedKey, true);
+ if (approvedKeyHandle != null)
+ {
+ byte[] enabledData = { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ approvedKeyHandle.SetValue(keyName, enabledData, RegistryValueKind.Binary);
+ }
+ }
+ }
+ else
+ {
+ key.DeleteValue(keyName, false);
+
+ using var approvedKeyHandle = Registry.CurrentUser.OpenSubKey(approvedKey, true);
+ approvedKeyHandle?.DeleteValue(keyName, false);
+ }
+ }
+ catch
+ {
+ }
+ }
+
+ public bool IsStartupEnabled()
+ {
+ const string keyName = "ProxyBridge";
+ const string runKey = @"Software\Microsoft\Windows\CurrentVersion\Run";
+
+ try
+ {
+ using var key = Registry.CurrentUser.OpenSubKey(runKey, false);
+ return key?.GetValue(keyName) != null;
+ }
+ catch
+ {
+ return false;
}
}
}
@@ -61,4 +116,5 @@ public class AppSettings
{
public bool CheckForUpdatesOnStartup { get; set; } = true;
public DateTime LastUpdateCheck { get; set; } = DateTime.MinValue;
+ public bool StartWithWindows { get; set; } = false;
}
\ No newline at end of file
diff --git a/Windows/gui/Styles/SharedStyles.axaml b/Windows/gui/Styles/SharedStyles.axaml
new file mode 100644
index 0000000..17c38b9
--- /dev/null
+++ b/Windows/gui/Styles/SharedStyles.axaml
@@ -0,0 +1,85 @@
+<Styles xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+ <Style Selector="TextBlock.label">
+ <Setter Property="Foreground" Value="#FFE0E0E0"/>
+ <Setter Property="FontSize" Value="13"/>
+ <Setter Property="FontWeight" Value="Medium"/>
+ </Style>
+
+ <Style Selector="TextBlock.error">
+ <Setter Property="Foreground" Value="#FFF48771"/>
+ <Setter Property="FontSize" Value="12"/>
+ <Setter Property="Margin" Value="0,4,0,0"/>
+ </Style>
+
+ <Style Selector="TextBlock.secondary">
+ <Setter Property="Foreground" Value="#FF999999"/>
+ </Style>
+
+ <Style Selector="TextBox">
+ <Setter Property="Background" Value="#FF1E1E1E"/>
+ <Setter Property="Foreground" Value="#FFE0E0E0"/>
+ <Setter Property="BorderBrush" Value="#FF3F3F46"/>
+ <Setter Property="BorderThickness" Value="1"/>
+ <Setter Property="Padding" Value="10,8"/>
+ <Setter Property="FontFamily" Value="Consolas,monospace"/>
+ <Setter Property="FontSize" Value="13"/>
+ </Style>
+
+ <Style Selector="TextBox:focus">
+ <Setter Property="BorderBrush" Value="#FF007ACC"/>
+ </Style>
+
+ <Style Selector="ComboBox">
+ <Setter Property="Background" Value="#FF1E1E1E"/>
+ <Setter Property="Foreground" Value="#FFE0E0E0"/>
+ <Setter Property="BorderBrush" Value="#FF3F3F46"/>
+ <Setter Property="Padding" Value="10,8"/>
+ </Style>
+
+ <Style Selector="ListBox">
+ <Setter Property="Background" Value="#FF252526"/>
+ <Setter Property="BorderBrush" Value="#FF3F3F46"/>
+ </Style>
+
+ <Style Selector="ListBoxItem">
+ <Setter Property="Padding" Value="16,14"/>
+ <Setter Property="Margin" Value="0"/>
+ <Setter Property="MinHeight" Value="68"/>
+ </Style>
+
+ <Style Selector="ListBoxItem:selected /template/ ContentPresenter">
+ <Setter Property="Background" Value="#FF094771"/>
+ </Style>
+
+ <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
+ <Setter Property="Background" Value="#FF2A2D2E"/>
+ </Style>
+
+ <Style Selector="CheckBox">
+ <Setter Property="Foreground" Value="#FFE0E0E0"/>
+ </Style>
+
+ <Style Selector="Button">
+ <Setter Property="Background" Value="#FF0E639C"/>
+ <Setter Property="Foreground" Value="White"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="Padding" Value="16,8"/>
+ <Setter Property="FontSize" Value="13"/>
+ <Setter Property="Cursor" Value="Hand"/>
+ </Style>
+
+ <Style Selector="Button:pointerover">
+ <Setter Property="Background" Value="#FF1177BB"/>
+ </Style>
+
+ <Style Selector="Button.secondary">
+ <Setter Property="Background" Value="#FF3E3E42"/>
+ </Style>
+
+ <Style Selector="Button.secondary:pointerover">
+ <Setter Property="Background" Value="#FF4E4E52"/>
+ </Style>
+
+</Styles>
diff --git a/Windows/gui/ViewModels/AboutViewModel.cs b/Windows/gui/ViewModels/AboutViewModel.cs
index 776d84d..bf71576 100644
--- a/Windows/gui/ViewModels/AboutViewModel.cs
+++ b/Windows/gui/ViewModels/AboutViewModel.cs
@@ -1,6 +1,7 @@
using System;
using System.Reflection;
using System.Windows.Input;
+using ProxyBridge.GUI.Common;
namespace ProxyBridge.GUI.ViewModels;
diff --git a/Windows/gui/ViewModels/MainWindowViewModel.cs b/Windows/gui/ViewModels/MainWindowViewModel.cs
index bba0c32..fa8083a 100644
--- a/Windows/gui/ViewModels/MainWindowViewModel.cs
+++ b/Windows/gui/ViewModels/MainWindowViewModel.cs
@@ -9,6 +9,7 @@ using Avalonia.Threading;
using Avalonia.Controls;
using ProxyBridge.GUI.Views;
using ProxyBridge.GUI.Services;
+using ProxyBridge.GUI.Common;
namespace ProxyBridge.GUI.ViewModels;
@@ -27,9 +28,11 @@ public class MainWindowViewModel : ViewModelBase
private bool _isAddRuleViewOpen;
private string _newProcessName = "";
private string _newProxyAction = "PROXY";
+ private bool _startWithWindows;
private Window? _mainWindow;
private ProxyBridgeService? _proxyService;
private bool _isServiceInitialized = false;
+ private readonly SettingsService _settingsService = new SettingsService();
private string _currentProxyType = "SOCKS5";
private string _currentProxyIp = "";
@@ -295,6 +298,12 @@ public class MainWindowViewModel : ViewModelBase
set => SetProperty(ref _chineseCheckmark, value);
}
+ public bool StartWithWindows
+ {
+ get => _startWithWindows;
+ set => SetProperty(ref _startWithWindows, value);
+ }
+
// Commands
public ICommand ShowProxySettingsCommand { get; }
public ICommand ShowProxyRulesCommand { get; }
@@ -302,6 +311,7 @@ public class MainWindowViewModel : ViewModelBase
public ICommand CheckForUpdatesCommand { get; }
public ICommand ToggleDnsViaProxyCommand { get; }
public ICommand ToggleCloseToTrayCommand { get; }
+ public ICommand ToggleStartWithWindowsCommand { get; }
public ICommand CloseDialogCommand { get; }
public ICommand ClearConnectionsLogCommand { get; }
public ICommand ClearActivityLogCommand { get; }
@@ -450,6 +460,15 @@ public class MainWindowViewModel : ViewModelBase
SaveConfigurationInternal();
});
+ ToggleStartWithWindowsCommand = new RelayCommand(() =>
+ {
+ StartWithWindows = !StartWithWindows;
+ var settings = _settingsService.LoadSettings();
+ settings.StartWithWindows = StartWithWindows;
+ _settingsService.SaveSettings(settings);
+ _settingsService.SetStartupWithWindows(StartWithWindows);
+ });
+
CloseDialogCommand = new RelayCommand(CloseDialogs);
ClearConnectionsLogCommand = new RelayCommand(() =>
@@ -611,6 +630,9 @@ public class MainWindowViewModel : ViewModelBase
{
try
{
+ var settings = _settingsService.LoadSettings();
+ StartWithWindows = settings.StartWithWindows && _settingsService.IsStartupEnabled();
+
var config = ConfigManager.LoadConfig();
_currentProxyType = config.ProxyType;
@@ -749,24 +771,3 @@ public class ProxyRule : ViewModelBase
set => SetProperty(ref _isSelected, value);
}
}
-
-// Simple ICommand implementation
-public class RelayCommand : ICommand
-{
- private readonly Action _execute;
- private readonly Func<bool>? _canExecute;
-
- public RelayCommand(Action execute, Func<bool>? canExecute = null)
- {
- _execute = execute ?? throw new ArgumentNullException(nameof(execute));
- _canExecute = canExecute;
- }
-
- public event EventHandler? CanExecuteChanged;
-
- public bool CanExecute(object? parameter) => _canExecute?.Invoke() ?? true;
-
- public void Execute(object? parameter) => _execute();
-
- public void RaiseCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty);
-}
diff --git a/Windows/gui/ViewModels/ProxyRulesViewModel.cs b/Windows/gui/ViewModels/ProxyRulesViewModel.cs
index 24e6520..630d04e 100644
--- a/Windows/gui/ViewModels/ProxyRulesViewModel.cs
+++ b/Windows/gui/ViewModels/ProxyRulesViewModel.cs
@@ -5,6 +5,7 @@ using System.Text.Json.Serialization;
using System.Windows.Input;
using Avalonia.Controls;
using ProxyBridge.GUI.Services;
+using ProxyBridge.GUI.Common;
namespace ProxyBridge.GUI.ViewModels;
@@ -624,32 +625,3 @@ public class ProxyRuleExport
internal partial class ProxyRuleJsonContext : JsonSerializerContext
{
}
-
-public class RelayCommandWithParameter<T> : ICommand
-{
- private readonly Action<T> _execute;
- private readonly Func<T, bool>? _canExecute;
-
- public RelayCommandWithParameter(Action<T> execute, Func<T, bool>? canExecute = null)
- {
- _execute = execute ?? throw new ArgumentNullException(nameof(execute));
- _canExecute = canExecute;
- }
-
- public event EventHandler? CanExecuteChanged;
-
- public bool CanExecute(object? parameter)
- {
- if (parameter is T typedParameter)
- return _canExecute?.Invoke(typedParameter) ?? true;
- return false;
- }
-
- public void Execute(object? parameter)
- {
- if (parameter is T typedParameter)
- _execute(typedParameter);
- }
-
- public void RaiseCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty);
-}
diff --git a/Windows/gui/ViewModels/ProxySettingsViewModel.cs b/Windows/gui/ViewModels/ProxySettingsViewModel.cs
index 3dcdff8..0d75bfe 100644
--- a/Windows/gui/ViewModels/ProxySettingsViewModel.cs
+++ b/Windows/gui/ViewModels/ProxySettingsViewModel.cs
@@ -3,6 +3,7 @@ using System.Net;
using System.Text.RegularExpressions;
using System.Windows.Input;
using ProxyBridge.GUI.Services;
+using ProxyBridge.GUI.Common;
namespace ProxyBridge.GUI.ViewModels;
@@ -11,7 +12,7 @@ public class ProxySettingsViewModel : ViewModelBase
private readonly Loc _loc = Loc.Instance;
public Loc Loc => _loc;
- private string _proxyIp = ""; // Can be IP address or hostname
+ private string _proxyIp = "";
private string _proxyPort = "";
private string _proxyType = "SOCKS5";
private string _proxyUsername = "";
diff --git a/Windows/gui/ViewModels/UpdateCheckViewModel.cs b/Windows/gui/ViewModels/UpdateCheckViewModel.cs
index d80dad0..ed94669 100644
--- a/Windows/gui/ViewModels/UpdateCheckViewModel.cs
+++ b/Windows/gui/ViewModels/UpdateCheckViewModel.cs
@@ -2,6 +2,7 @@ using System;
using System.Windows.Input;
using System.Threading.Tasks;
using ProxyBridge.GUI.Services;
+using ProxyBridge.GUI.Common;
namespace ProxyBridge.GUI.ViewModels;
diff --git a/Windows/gui/ViewModels/UpdateNotificationViewModel.cs b/Windows/gui/ViewModels/UpdateNotificationViewModel.cs
index a8e8add..8d51a22 100644
--- a/Windows/gui/ViewModels/UpdateNotificationViewModel.cs
+++ b/Windows/gui/ViewModels/UpdateNotificationViewModel.cs
@@ -5,6 +5,7 @@ using System.Diagnostics;
using System.IO;
using System.Net.Http;
using ProxyBridge.GUI.Services;
+using ProxyBridge.GUI.Common;
namespace ProxyBridge.GUI.ViewModels;
diff --git a/Windows/gui/Views/MainWindow.axaml b/Windows/gui/Views/MainWindow.axaml
index e29cbdd..5fa35ea 100644
--- a/Windows/gui/Views/MainWindow.axaml
+++ b/Windows/gui/Views/MainWindow.axaml
@@ -223,6 +223,14 @@
Margin="0"/>
</MenuItem.Icon>
</MenuItem>
+ <MenuItem Header="{Binding Loc.MenuRunAtStartup}"
+ Command="{Binding ToggleStartWithWindowsCommand}">
+ <MenuItem.Icon>
+ <CheckBox IsChecked="{Binding StartWithWindows}"
+ IsHitTestVisible="False"
+ Margin="0"/>
+ </MenuItem.Icon>
+ </MenuItem>
<Separator/>
<MenuItem Header="{Binding Loc.MenuLanguage}">
<MenuItem Header="English" Click="OnChangeLanguageEnglish">
diff --git a/Windows/gui/Views/ProxyRulesWindow.axaml b/Windows/gui/Views/ProxyRulesWindow.axaml
index 0064ece..620a051 100644
--- a/Windows/gui/Views/ProxyRulesWindow.axaml
+++ b/Windows/gui/Views/ProxyRulesWindow.axaml
@@ -20,83 +20,6 @@
<views:SelectAllIconConverter x:Key="SelectAllIconConverter"/>
</Window.Resources>
- <Window.Styles>
- <Style Selector="TextBlock.label">
- <Setter Property="Foreground" Value="#FFE0E0E0"/>
- <Setter Property="FontSize" Value="13"/>
- <Setter Property="FontWeight" Value="Medium"/>
- </Style>
-
- <Style Selector="TextBlock.secondary">
- <Setter Property="Foreground" Value="#FF999999"/>
- </Style>
-
- <Style Selector="TextBox">
- <Setter Property="Background" Value="#FF1E1E1E"/>
- <Setter Property="Foreground" Value="#FFE0E0E0"/>
- <Setter Property="BorderBrush" Value="#FF3F3F46"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="Padding" Value="10,8"/>
- <Setter Property="FontFamily" Value="Consolas,monospace"/>
- <Setter Property="FontSize" Value="13"/>
- </Style>
-
- <Style Selector="TextBox:focus">
- <Setter Property="BorderBrush" Value="#FF007ACC"/>
- </Style>
-
- <Style Selector="ComboBox">
- <Setter Property="Background" Value="#FF1E1E1E"/>
- <Setter Property="Foreground" Value="#FFE0E0E0"/>
- <Setter Property="BorderBrush" Value="#FF3F3F46"/>
- <Setter Property="Padding" Value="10,8"/>
- </Style>
-
- <Style Selector="ListBox">
- <Setter Property="Background" Value="#FF252526"/>
- <Setter Property="BorderBrush" Value="#FF3F3F46"/>
- </Style>
-
- <Style Selector="ListBoxItem">
- <Setter Property="Padding" Value="16,14"/>
- <Setter Property="Margin" Value="0"/>
- <Setter Property="MinHeight" Value="68"/>
- </Style>
-
- <Style Selector="ListBoxItem:selected /template/ ContentPresenter">
- <Setter Property="Background" Value="#FF094771"/>
- </Style>
-
- <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
- <Setter Property="Background" Value="#FF2A2D2E"/>
- </Style>
-
- <Style Selector="CheckBox">
- <Setter Property="Foreground" Value="#FFE0E0E0"/>
- </Style>
-
- <Style Selector="Button">
- <Setter Property="Background" Value="#FF0E639C"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Padding" Value="16,8"/>
- <Setter Property="FontSize" Value="13"/>
- <Setter Property="Cursor" Value="Hand"/>
- </Style>
-
- <Style Selector="Button:pointerover">
- <Setter Property="Background" Value="#FF1177BB"/>
- </Style>
-
- <Style Selector="Button.secondary">
- <Setter Property="Background" Value="#FF3E3E42"/>
- </Style>
-
- <Style Selector="Button.secondary:pointerover">
- <Setter Property="Background" Value="#FF4E4E52"/>
- </Style>
- </Window.Styles>
-
<DockPanel>
<!-- Header -->
<Border DockPanel.Dock="Top" Background="#FF1E1E1E" Padding="20,16">
diff --git a/Windows/gui/Views/ProxySettingsWindow.axaml b/Windows/gui/Views/ProxySettingsWindow.axaml
index 0d2ccb5..c4819e1 100644
--- a/Windows/gui/Views/ProxySettingsWindow.axaml
+++ b/Windows/gui/Views/ProxySettingsWindow.axaml
@@ -15,62 +15,6 @@
Background="#FF2D2D30"
WindowStartupLocation="CenterOwner">
- <Window.Styles>
- <Style Selector="TextBlock.label">
- <Setter Property="Foreground" Value="#FFE0E0E0"/>
- <Setter Property="FontSize" Value="13"/>
- <Setter Property="FontWeight" Value="Medium"/>
- </Style>
-
- <Style Selector="TextBlock.error">
- <Setter Property="Foreground" Value="#FFF48771"/>
- <Setter Property="FontSize" Value="12"/>
- <Setter Property="Margin" Value="0,4,0,0"/>
- </Style>
-
- <Style Selector="TextBox">
- <Setter Property="Background" Value="#FF1E1E1E"/>
- <Setter Property="Foreground" Value="#FFE0E0E0"/>
- <Setter Property="BorderBrush" Value="#FF3F3F46"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="Padding" Value="10,8"/>
- <Setter Property="FontFamily" Value="Consolas,monospace"/>
- <Setter Property="FontSize" Value="13"/>
- </Style>
-
- <Style Selector="TextBox:focus">
- <Setter Property="BorderBrush" Value="#FF007ACC"/>
- </Style>
-
- <Style Selector="ComboBox">
- <Setter Property="Background" Value="#FF1E1E1E"/>
- <Setter Property="Foreground" Value="#FFE0E0E0"/>
- <Setter Property="BorderBrush" Value="#FF3F3F46"/>
- <Setter Property="Padding" Value="10,8"/>
- </Style>
-
- <Style Selector="Button">
- <Setter Property="Background" Value="#FF0E639C"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Padding" Value="16,8"/>
- <Setter Property="FontSize" Value="13"/>
- <Setter Property="Cursor" Value="Hand"/>
- </Style>
-
- <Style Selector="Button:pointerover">
- <Setter Property="Background" Value="#FF1177BB"/>
- </Style>
-
- <Style Selector="Button.secondary">
- <Setter Property="Background" Value="#FF3E3E42"/>
- </Style>
-
- <Style Selector="Button.secondary:pointerover">
- <Setter Property="Background" Value="#FF4E4E52"/>
- </Style>
- </Window.Styles>
-
<DockPanel>
<!-- Header -->
<Border DockPanel.Dock="Top" Background="#FF1E1E1E" Padding="20,16">
diff --git a/Windows/installer/ProxyBridge.nsi b/Windows/installer/ProxyBridge.nsi
index b0798d6..707c986 100644
--- a/Windows/installer/ProxyBridge.nsi
+++ b/Windows/installer/ProxyBridge.nsi
@@ -1,5 +1,5 @@
!define PRODUCT_NAME "ProxyBridge"
-!define PRODUCT_VERSION "3.0.0"
+!define PRODUCT_VERSION "4.0.0"
!define PRODUCT_PUBLISHER "InterceptSuite"
!define PRODUCT_WEB_SITE "https://github.com/InterceptSuite/ProxyBridge"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
diff --git a/Windows/src/ProxyBridge.c b/Windows/src/ProxyBridge.c
index 329f401..9ca247d 100644
--- a/Windows/src/ProxyBridge.c
+++ b/Windows/src/ProxyBridge.c
@@ -16,7 +16,7 @@
#define LOCAL_PROXY_PORT 34010
#define LOCAL_UDP_RELAY_PORT 34011 // its running UDP port still make sure to not run on same port as TCP, opening same port and tcp and udp cause issue and handling port at relay server response injection
#define MAX_PROCESS_NAME 256
-#define VERSION "3.0.0"
+#define VERSION "4.0.0"
#define PID_CACHE_SIZE 1024
#define PID_CACHE_TTL_MS 1000
#define NUM_PACKET_THREADS 4 // Added Mlutiple threads