Skip to content

Commit 4cd093d

Browse files
committed
Fix Proxy
1 parent d509b11 commit 4cd093d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Flow.Launcher.Infrastructure/Http/Http.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ static Http()
3434

3535
client = new HttpClient(socketsHttpHandler, false);
3636
client.DefaultRequestHeaders.Add("User-Agent", UserAgent);
37+
HttpClient.DefaultProxy = WebProxy;
3738
}
3839

3940
private static HttpProxy proxy;
@@ -45,6 +46,7 @@ public static HttpProxy Proxy
4546
{
4647
proxy = value;
4748
proxy.PropertyChanged += UpdateProxy;
49+
UpdateProxy(ProxyProperty.Enabled);
4850
}
4951
}
5052

Flow.Launcher/App.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
6161
_settingsVM = new SettingWindowViewModel(_updater, _portable);
6262
_settings = _settingsVM.Settings;
6363

64+
Http.Proxy = _settings.Proxy;
65+
6466
_alphabet.Initialize(_settings);
6567
_stringMatcher = new StringMatcher(_alphabet);
6668
StringMatcher.Instance = _stringMatcher;
@@ -85,8 +87,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
8587
ThemeManager.Instance.Settings = _settings;
8688
ThemeManager.Instance.ChangeTheme(_settings.Theme);
8789

88-
Http.Proxy = _settings.Proxy;
89-
9090
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
9191

9292
RegisterExitEvents();

0 commit comments

Comments
 (0)