Skip to content

Commit

Permalink
Add DynamicHttpWindowsProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
AigioL committed Dec 13, 2022
1 parent b9e03e7 commit 4f9e659
Show file tree
Hide file tree
Showing 2 changed files with 2,105 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ST.Client.Desktop.Avalonia.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Avalonia;
using Avalonia.ReactiveUI;
using Avalonia.Controls;
using System.Net.Http;

#if WINDOWS || WINDOWS_DESKTOP_BRIDGE
using WPFMessageBox = System.Windows.MessageBox;
Expand Down Expand Up @@ -47,6 +48,10 @@ static int Main(string[] args)
// fix The request was aborted: Could not create SSL/TLS secure channel
TrySetSecurityProtocol();

#if WINDOWS || WINDOWS_DESKTOP_BRIDGE
HttpClient.DefaultProxy = DynamicHttpWindowsProxy.Instance;
#endif

#if WINDOWS_DESKTOP_BRIDGE
if (!DesktopBridgeHelper.Init()) return 0;
InitWithUWP(ref args);
Expand Down
Loading

0 comments on commit 4f9e659

Please sign in to comment.