diff --git a/Flow.Launcher.Infrastructure/Http/Http.cs b/Flow.Launcher.Infrastructure/Http/Http.cs index 5af50bc6d..988976749 100644 --- a/Flow.Launcher.Infrastructure/Http/Http.cs +++ b/Flow.Launcher.Infrastructure/Http/Http.cs @@ -34,6 +34,7 @@ namespace Flow.Launcher.Infrastructure.Http client = new HttpClient(socketsHttpHandler, false); client.DefaultRequestHeaders.Add("User-Agent", UserAgent); + HttpClient.DefaultProxy = WebProxy; } private static HttpProxy proxy; @@ -45,6 +46,7 @@ namespace Flow.Launcher.Infrastructure.Http { proxy = value; proxy.PropertyChanged += UpdateProxy; + UpdateProxy(ProxyProperty.Enabled); } } diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 06bb16e3b..7c4c6a367 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -61,6 +61,8 @@ namespace Flow.Launcher _settingsVM = new SettingWindowViewModel(_updater, _portable); _settings = _settingsVM.Settings; + Http.Proxy = _settings.Proxy; + _alphabet.Initialize(_settings); _stringMatcher = new StringMatcher(_alphabet); StringMatcher.Instance = _stringMatcher; @@ -85,8 +87,6 @@ namespace Flow.Launcher ThemeManager.Instance.Settings = _settings; ThemeManager.Instance.ChangeTheme(_settings.Theme); - Http.Proxy = _settings.Proxy; - Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); RegisterExitEvents();