diff --git a/NebulaAuth/App.xaml b/NebulaAuth/App.xaml index ef12067..ba1e251 100644 --- a/NebulaAuth/App.xaml +++ b/NebulaAuth/App.xaml @@ -8,9 +8,6 @@ StartupUri="MainWindow.xaml"> - #1E2025 - pack://application:,,,/Fonts/Roboto/#Roboto - pack://application:,,,/Fonts/Roboto/#Roboto Symbols @@ -19,30 +16,88 @@ + + + + + + + True False - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NebulaAuth/Converters/NullableToBooleanConverter.cs b/NebulaAuth/Converters/NullableToBooleanConverter.cs new file mode 100644 index 0000000..06897f7 --- /dev/null +++ b/NebulaAuth/Converters/NullableToBooleanConverter.cs @@ -0,0 +1,18 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace NebulaAuth.Converters; + +public class NullableToBooleanConverter : IValueConverter +{ + public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + return value != null; + } + + public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotSupportedException(); + } +} \ No newline at end of file diff --git a/NebulaAuth/Core/ThemeManager.cs b/NebulaAuth/Core/ThemeManager.cs index 81b123f..5c15cfb 100644 --- a/NebulaAuth/Core/ThemeManager.cs +++ b/NebulaAuth/Core/ThemeManager.cs @@ -2,6 +2,9 @@ using System.ComponentModel; using System.Drawing; using System.Drawing.Drawing2D; + +using System.Linq; + using System.Windows; using System.Windows.Interop; using System.Windows.Media; @@ -61,9 +64,27 @@ public static class ThemeManager private static void UpdateBackground() { var color = Settings.Instance.BackgroundColor ?? DefaultBackgroundColor; - Application.Current.Resources["WindowBackground"] = new SolidColorBrush(color); + + Application.Current.Resources["Background"] = color; + ApplyTheme(); } + private static void ApplyTheme() + { + var keysToGenerate = Application.Current.Resources.Keys + .OfType() + .Where(k => Application.Current.Resources[k] is System.Windows.Media.Color); + + foreach (var key in keysToGenerate) + { + var brushKey = key + "Brush"; // Генерируем имя для Brush + var color = (System.Windows.Media.Color) Application.Current.Resources[key]; + Application.Current.Resources[brushKey] = new SolidColorBrush(color); + } + + } + + public static void InitializeTheme() { UpdateIcon(); diff --git a/NebulaAuth/MainWindow.xaml b/NebulaAuth/MainWindow.xaml index 41e64c2..fdb20db 100644 --- a/NebulaAuth/MainWindow.xaml +++ b/NebulaAuth/MainWindow.xaml @@ -9,12 +9,16 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:entities="clr-namespace:NebulaAuth.Model.Entities" xmlns:viewModel="clr-namespace:NebulaAuth.ViewModel" + xmlns:controls="clr-namespace:NebulaAuth.Theme.Controls" WindowStartupLocation="CenterScreen" MinHeight="500" MinWidth="500" DefaultFontSize="18" ScaleCoefficient="0.4" - Title="NebulaAuth" Height="800" Width="730" Style="{StaticResource MainWindow}" + Title="NebulaAuth" Height="800" Width="730" + + Style="{StaticResource MainWindow}" RenderOptions.BitmapScalingMode="HighQuality" Foreground="#FFF5F5F5" FontFamily="{md:MaterialDesignFont}" - TextElement.Foreground="{DynamicResource MaterialDesignBody}" + TextElement.Foreground="{DynamicResource BaseContentBrush}" + mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModel:MainVM}"> @@ -40,8 +44,8 @@ VerticalAlignment="Center" Visibility="{Binding Settings.BackgroundMode, Converter={StaticResource BackgroundImageVisibleConverter}}" Source="{Binding Settings.BackgroundMode, Mode=OneWay, Converter={StaticResource BackgroundSourceConverter}}" /> - + + - + + - @@ -114,6 +121,7 @@ md:HintAssist.Hint="{Tr MainWindow.AppBar.Proxy.ProxyHint}" md:ComboBoxAssist.ShowSelectedItem="False" SelectedValue="{Binding SelectedProxy}" + ItemsSource="{Binding Proxies}"> @@ -158,7 +166,6 @@ ToolTipService.InitialShowDelay="300" Visibility="{Binding IsDefaultProxy, Converter={StaticResource BooleanToVisibilityConverter}}" /> @@ -175,7 +182,6 @@ @@ -233,11 +239,10 @@ - - - - + + Converter="{StaticResource PortableMaClientStatusToColorConverter}" + FallbackValue="{StaticResource PrimaryContentBrush}" /> + + @@ -316,15 +322,14 @@ md:HintAssist.Hint="{Tr MainWindow.LeftPart.SearchBoxHint}" Text="{Binding SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> - - - - + - + + @@ -334,25 +339,24 @@ - - - - - - - + + + by achies diff --git a/NebulaAuth/Model/MAAC/MultiAccountAutoConfirmer.cs b/NebulaAuth/Model/MAAC/MultiAccountAutoConfirmer.cs index 63894c3..105e95f 100644 --- a/NebulaAuth/Model/MAAC/MultiAccountAutoConfirmer.cs +++ b/NebulaAuth/Model/MAAC/MultiAccountAutoConfirmer.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using AchiesUtilities.Extensions; using NebulaAuth.Core; using NebulaAuth.Model.Entities; -using NLog; namespace NebulaAuth.Model.MAAC; @@ -60,7 +59,7 @@ public static class MultiAccountAutoConfirmer private static async Task TimerConfirmInternal() { var clients = Lock.ReadLock(() => Clients.ToArray()); - var enabledClients = clients.Where(x => x.LinkedClient is { IsError: false }).ToArray(); + var enabledClients = clients.Where(x => x.LinkedClient is {IsError: false}).ToArray(); enabledClients = DistributeEvenly(enabledClients).ToArray(); var confirmed = 0; await Task.Run(async () => diff --git a/NebulaAuth/Model/MAAC/PortableMaClient.cs b/NebulaAuth/Model/MAAC/PortableMaClient.cs index c73161e..a67105f 100644 --- a/NebulaAuth/Model/MAAC/PortableMaClient.cs +++ b/NebulaAuth/Model/MAAC/PortableMaClient.cs @@ -17,6 +17,7 @@ using SteamLib.Authentication; using SteamLib.Core.Interfaces; using SteamLib.Exceptions; using SteamLib.SteamMobile.Confirmations; +using SteamLib.Utility; using SteamLib.Web; namespace NebulaAuth.Model.MAAC; @@ -26,7 +27,7 @@ public partial class PortableMaClient : ObservableObject, IDisposable private const string LOC_PATH = "MAAC"; public Mafile Mafile { get; } private HttpClient Client { get; } - private HttpClientHandler ClientHandler { get; } + private SocketsHttpHandler ClientHandler { get; } private DynamicProxy Proxy { get; } private readonly CancellationTokenSource _cts = new(); diff --git a/NebulaAuth/Model/MaClient.cs b/NebulaAuth/Model/MaClient.cs index 2ad2a31..69a6f0c 100644 --- a/NebulaAuth/Model/MaClient.cs +++ b/NebulaAuth/Model/MaClient.cs @@ -12,13 +12,14 @@ using SteamLib.Core.Interfaces; using SteamLib.Exceptions; using SteamLib.ProtoCore.Services; using SteamLib.SteamMobile.Confirmations; +using SteamLib.Utility; using SteamLib.Web; namespace NebulaAuth.Model; public static class MaClient { - private static HttpClientHandler ClientHandler { get; } + private static SocketsHttpHandler ClientHandler { get; } private static HttpClient Client { get; } @@ -26,6 +27,7 @@ public static class MaClient public static ProxyData? DefaultProxy { get; set; } + static MaClient() { Proxy = new DynamicProxy(); diff --git a/NebulaAuth/Model/PHandler.cs b/NebulaAuth/Model/PHandler.cs index 4b9c664..ff2b253 100644 --- a/NebulaAuth/Model/PHandler.cs +++ b/NebulaAuth/Model/PHandler.cs @@ -79,7 +79,7 @@ public static class PHandler return decryptedText; } - public static string? DecryptPassword(string? encryptedPassword) + public static string? DecryptPassword(string? encryptedPassword) { if (string.IsNullOrWhiteSpace(encryptedPassword)) return null; try diff --git a/NebulaAuth/Model/SessionHandler.cs b/NebulaAuth/Model/SessionHandler.cs index d042159..b3bdec2 100644 --- a/NebulaAuth/Model/SessionHandler.cs +++ b/NebulaAuth/Model/SessionHandler.cs @@ -8,6 +8,8 @@ using NebulaAuth.Core; using NebulaAuth.Model.Entities; using NebulaAuth.View.Dialogs; using SteamLib.Exceptions; +using SteamLib.Utility; + namespace NebulaAuth.Model; @@ -16,7 +18,7 @@ public static partial class SessionHandler private static readonly SemaphoreSlim Semaphore = new(1, 1); public static async Task Handle(Func> func, Mafile mafile, - HttpClientHandlerPair? chp = null, string? snackbarPrefix = null) + SocketsClientHandlerPair? chp = null, string? snackbarPrefix = null) { chp ??= MaClient.GetHttpClientHandlerPair(mafile); await Semaphore.WaitAsync(); @@ -30,7 +32,7 @@ public static partial class SessionHandler } } - private static async Task HandleInternal(Func> func, HttpClientHandlerPair chp, Mafile mafile, + private static async Task HandleInternal(Func> func, SocketsClientHandlerPair chp, Mafile mafile, string? snackbarPrefix = null) { using var scope = Shell.Logger.PushScopeProperty("Scope", "SessionHandler"); @@ -135,7 +137,7 @@ public static partial class SessionHandler } - private static async Task RefreshInternal(HttpClientHandlerPair chp, Mafile mafile) + private static async Task RefreshInternal(SocketsClientHandlerPair chp, Mafile mafile) { try { @@ -150,7 +152,7 @@ public static partial class SessionHandler } } - private static async Task LoginAgainInternal(HttpClientHandlerPair chp, Mafile mafile, string password, + private static async Task LoginAgainInternal(SocketsClientHandlerPair chp, Mafile mafile, string password, bool savePassword) { var t = Task.Run(OnLoginStarted); diff --git a/NebulaAuth/Model/SessionHandler_API.cs b/NebulaAuth/Model/SessionHandler_API.cs index c6ebd25..6ec21b4 100644 --- a/NebulaAuth/Model/SessionHandler_API.cs +++ b/NebulaAuth/Model/SessionHandler_API.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; + using AchiesUtilities.Web.Models; using NebulaAuth.Model.Entities; using SteamLib.Account; @@ -7,12 +8,14 @@ using SteamLib.Authentication; using SteamLib.Authentication.LoginV2; using SteamLib.Exceptions; using SteamLib.SteamMobile; +using SteamLib.Utility; + namespace NebulaAuth.Model; public partial class SessionHandler //API { - public static async Task RefreshMobileToken(HttpClientHandlerPair chp, Mafile mafile) + public static async Task RefreshMobileToken(SocketsClientHandlerPair chp, Mafile mafile) { if (mafile.SessionData is not {RefreshToken.IsExpired: false}) throw new SessionPermanentlyExpiredException(SessionInvalidException.SESSION_NULL_MSG); @@ -32,7 +35,7 @@ public partial class SessionHandler //API chp.Handler.CookieContainer.SetSteamMobileCookiesWithMobileToken(mafile.SessionData); } - public static async Task LoginAgain(HttpClientHandlerPair chp, Mafile mafile, string password, bool savePassword) + public static async Task LoginAgain(SocketsClientHandlerPair chp, Mafile mafile, string password, bool savePassword) { var sgGenerator = new SteamGuardCodeGenerator(mafile.SharedSecret); var options = new LoginV2ExecutorOptions(LoginV2Executor.NullConsumer, chp.Client) diff --git a/NebulaAuth/NebulaAuth.csproj b/NebulaAuth/NebulaAuth.csproj index 440bd73..b31ae33 100644 --- a/NebulaAuth/NebulaAuth.csproj +++ b/NebulaAuth/NebulaAuth.csproj @@ -14,35 +14,35 @@ true - - - - - - - - - - - - - - - - - - - - - - - Never - - - - + + + + + + + + + + + + + + + + + + + + + Never + + + + + + @@ -50,19 +50,19 @@ - - Code - + + Code + - - - Always - - - Always - - + + + Always + + + Always + + diff --git a/NebulaAuth/PlannedChanges.txt b/NebulaAuth/PlannedChanges.txt index bac9938..d800fe0 100644 --- a/NebulaAuth/PlannedChanges.txt +++ b/NebulaAuth/PlannedChanges.txt @@ -6,4 +6,8 @@ • Добавить запоминание пароля при привязке мафайла • Функция переноса гуарда с мобильного устройства на ПК с созданием мафайла • Добавить полное шифрование мафайлов по аналогии с SDA -• Сделать автоматический билд и загрузку обновления на Github при изменении в мастер ветке \ No newline at end of file +• Сделать автоматический билд и загрузку обновления на Github при изменении в мастер ветке +• Антик-окно как в MarketApp, возможность сразу открыть браузер напр. на CefSharp с залогиненым аккаунтом +• Стабильность авто-подтверждений, возможность задать пользователю порог времени когда льются ошибки и только тогда выключать авто-подтверждение +• Безопасное сохранение мафайлов через .tmp / .bak +• Создание механизма накопления ошибок, чтобы исправить Patch Tuesday, условно аккаунт может игнорировать ошибки 1-2 часа (настриавемо) \ No newline at end of file diff --git a/NebulaAuth/Theme/Brushes.xaml b/NebulaAuth/Theme/Brushes.xaml index d96edc1..b82f0e9 100644 --- a/NebulaAuth/Theme/Brushes.xaml +++ b/NebulaAuth/Theme/Brushes.xaml @@ -1,9 +1,65 @@  + + #794DFF + #eae7ff + #76717f + #ffffff + #3b82f6 + #dbeafe + #928f9e + #141119 + #282332 + #1d1a26 + #4a4456 + #231f2c + #b8b6c0 + #1e1e24 + #06b6d4 + #cffafe + #02ca4b + #e1faf1 + #fcaa1d + #fffae8 + #fb4141 + #fff5ed + + #d66d1c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + \ No newline at end of file diff --git a/NebulaAuth/Theme/Controls/CodeProgressBar.cs b/NebulaAuth/Theme/Controls/CodeProgressBar.cs new file mode 100644 index 0000000..d05a765 --- /dev/null +++ b/NebulaAuth/Theme/Controls/CodeProgressBar.cs @@ -0,0 +1,53 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media.Animation; + +namespace NebulaAuth.Theme.Controls; + +public class CodeProgressBar : ProgressBar +{ + public static readonly DependencyProperty TimeRemainingProperty = + DependencyProperty.Register(nameof(TimeRemaining), typeof(double), typeof(CodeProgressBar), + new PropertyMetadata(-1.0, OnTimeRemainingChanged)); + + public static readonly DependencyProperty MaxTimeProperty = + DependencyProperty.Register(nameof(MaxTime), typeof(double), typeof(CodeProgressBar), + new PropertyMetadata(30.0)); // По умолчанию 30 сек + + public double TimeRemaining + { + get => (double) GetValue(TimeRemainingProperty); + set => SetValue(TimeRemainingProperty, value); + } + + public double MaxTime + { + get => (double) GetValue(MaxTimeProperty); + set => SetValue(MaxTimeProperty, value); + } + + private static void OnTimeRemainingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is CodeProgressBar progressBar) + { + var newValue = (double) e.NewValue; + progressBar.StartProgressAnimation(newValue); + } + } + + private void StartProgressAnimation(double timeRemaining) + { + if (timeRemaining <= 0 || MaxTime <= 0) return; + var progress = (1 - timeRemaining / MaxTime) * 100; + + var animation = new DoubleAnimation + { + From = progress, + To = 100, + Duration = TimeSpan.FromSeconds(timeRemaining) + }; + + BeginAnimation(ValueProperty, animation); + } +} \ No newline at end of file diff --git a/NebulaAuth/Theme/MaterialDesignThemes.Overrides.xaml b/NebulaAuth/Theme/MaterialDesignThemes.Overrides.xaml new file mode 100644 index 0000000..e7a0621 --- /dev/null +++ b/NebulaAuth/Theme/MaterialDesignThemes.Overrides.xaml @@ -0,0 +1,17 @@ + + + + + + + + + \ No newline at end of file diff --git a/NebulaAuth/Theme/SplashScreen.png b/NebulaAuth/Theme/SplashScreen.png index 3255bc0..8132397 100644 Binary files a/NebulaAuth/Theme/SplashScreen.png and b/NebulaAuth/Theme/SplashScreen.png differ diff --git a/NebulaAuth/Theme/SplashScreen2.psd b/NebulaAuth/Theme/SplashScreen2.psd new file mode 100644 index 0000000..b963ea2 Binary files /dev/null and b/NebulaAuth/Theme/SplashScreen2.psd differ diff --git a/NebulaAuth/Theme/WindowStyle/WindowStyle.xaml b/NebulaAuth/Theme/WindowStyle/WindowStyle.xaml index 4e8e25c..c03d82f 100644 --- a/NebulaAuth/Theme/WindowStyle/WindowStyle.xaml +++ b/NebulaAuth/Theme/WindowStyle/WindowStyle.xaml @@ -17,7 +17,8 @@ Margin="{x:Static local:WindowChromeHelper.LayoutOffsetThickness}" BorderBrush="Transparent" BorderThickness="1" - Background="{DynamicResource WindowBackground}"> + Background="{DynamicResource BackgroundBrush}"> + @@ -26,11 +27,12 @@ + Background="{DynamicResource Base100Brush}"> + + d:DataContext="{d:DesignInstance other:LoginAgainVM}"> + diff --git a/NebulaAuth/View/ProxyManagerView.xaml b/NebulaAuth/View/ProxyManagerView.xaml index e05fd15..719836a 100644 --- a/NebulaAuth/View/ProxyManagerView.xaml +++ b/NebulaAuth/View/ProxyManagerView.xaml @@ -7,13 +7,12 @@ xmlns:other="clr-namespace:NebulaAuth.ViewModel.Other" mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="400" - Foreground="WhiteSmoke" FontFamily="{md:MaterialDesignFont}" MinHeight="500" MinWidth="400" MaxHeight="550" d:DataContext="{d:DesignInstance other:ProxyManagerVM}" - Background="{DynamicResource WindowBackground}"> + Background="{DynamicResource BackgroundBrush1}"> diff --git a/NebulaAuth/ViewModel/MainVM.cs b/NebulaAuth/ViewModel/MainVM.cs index c3fe2c3..a771c32 100644 --- a/NebulaAuth/ViewModel/MainVM.cs +++ b/NebulaAuth/ViewModel/MainVM.cs @@ -51,6 +51,16 @@ public partial class MainVM : ObservableObject } } + [RelayCommand] + public void Debug() + { + var ph = new PaletteHelper(); + var t = new MaterialDesignThemes.Wpf.Theme(); + var cur = ph.GetTheme(); + t.SetDarkTheme(); + ph.SetTheme(t); + } + private void SetMafile(Mafile? mafile) { diff --git a/NebulaAuth/ViewModel/MainVM_Code.cs b/NebulaAuth/ViewModel/MainVM_Code.cs index 7a133d8..7e97294 100644 --- a/NebulaAuth/ViewModel/MainVM_Code.cs +++ b/NebulaAuth/ViewModel/MainVM_Code.cs @@ -22,6 +22,7 @@ public partial class MainVM [MemberNotNull(nameof(_codeTimer))] private void CreateCodeTimer() { + CodeProgress = CalculateCodeProgress(); _codeTimer = new Timer(UpdateCode, null, 0, 1000); } @@ -30,24 +31,28 @@ public partial class MainVM { var currentTime = TimeAligner.GetSteamTime(); var untilChange = currentTime % 30; - var codeProgress = untilChange / 30D * 100; - - string? code = null; - if (untilChange == 0 && SelectedMafile != null) - { - code = SteamGuardCodeGenerator.GenerateCode(SelectedMafile!.SharedSecret); - } - + if (untilChange != 0) return; if (Application.Current == null) return; - Application.Current.Dispatcher.BeginInvoke((string? c) => + Application.Current.Dispatcher.BeginInvoke(() => { + CodeProgress = -1; + CodeProgress = 30; if (Application.Current.MainWindow?.WindowState == WindowState.Minimized) return; - CodeProgress = codeProgress; - if (c != null) Code = c; - }, DispatcherPriority.DataBind, code); + if (SelectedMafile == null) return; + Code = SteamGuardCodeGenerator.GenerateCode(SelectedMafile.SharedSecret); + }, DispatcherPriority.DataBind); } + + private long CalculateCodeProgress() + { + var currentTime = TimeAligner.GetSteamTime(); + var untilChange = currentTime % 30; + return 30 - untilChange; + } + + [RelayCommand(AllowConcurrentExecutions = false)] private async Task CopyCode() { diff --git a/NebulaAuth/ViewModel/MainVM_Proxy.cs b/NebulaAuth/ViewModel/MainVM_Proxy.cs index b288f56..0a1a6c8 100644 --- a/NebulaAuth/ViewModel/MainVM_Proxy.cs +++ b/NebulaAuth/ViewModel/MainVM_Proxy.cs @@ -37,12 +37,13 @@ public partial class MainVM } if (!system && SelectedMafile != null) + { SelectedMafile.Proxy = SelectedProxy; Storage.UpdateMafile(SelectedMafile); } - CheckProxyExist(); + } [RelayCommand] diff --git a/NebulaAuth/ViewModel/Other/LinkAccountVM.cs b/NebulaAuth/ViewModel/Other/LinkAccountVM.cs index 62f7ec2..1536656 100644 --- a/NebulaAuth/ViewModel/Other/LinkAccountVM.cs +++ b/NebulaAuth/ViewModel/Other/LinkAccountVM.cs @@ -364,6 +364,7 @@ public partial class LinkAccountVM : ObservableObject, IEmailProvider, IPhoneNum private static HttpClient Client { get; } private static HttpClientHandler Handler { get; } + private static DynamicProxy Proxy { get; } public ObservableDictionary Proxies => ProxyStorage.Proxies; diff --git a/SteamLibForked/Utility/SocketsClientHandlerPair.cs b/SteamLibForked/Utility/SocketsClientHandlerPair.cs new file mode 100644 index 0000000..02e7005 --- /dev/null +++ b/SteamLibForked/Utility/SocketsClientHandlerPair.cs @@ -0,0 +1,18 @@ +namespace SteamLib.Utility; + +public readonly struct SocketsClientHandlerPair +{ + public SocketsHttpHandler Handler { get; } + public HttpClient Client { get; } + + public SocketsClientHandlerPair(HttpClient client, SocketsHttpHandler handler) + { + Handler = handler; + Client = client; + } + + public (SocketsHttpHandler, HttpClient) Deconstruct() + { + return (Handler, Client); + } +} \ No newline at end of file diff --git a/SteamLibForked/Web/ClientBuilder.cs b/SteamLibForked/Web/ClientBuilder.cs index f9741eb..409eaf5 100644 --- a/SteamLibForked/Web/ClientBuilder.cs +++ b/SteamLibForked/Web/ClientBuilder.cs @@ -1,8 +1,8 @@ using System.Net; using System.Net.Http.Headers; -using AchiesUtilities.Web.Models; using SteamLib.Authentication; using SteamLib.Core.Interfaces; +using SteamLib.Utility; namespace SteamLib.Web; @@ -12,7 +12,7 @@ public static class ClientBuilder bool disposeHandler = true) { sessionData?.EnsureValidated(); - var handler = new HttpClientHandler(); + var handler = new SocketsHttpHandler(); var client = new HttpClient(handler, disposeHandler); client.DefaultRequestHeaders.Accept.ParseAdd( @@ -39,7 +39,7 @@ public static class ClientBuilder } - private static void ConfigureCommon(HttpClientHandler handler, HttpClient client) + private static void ConfigureCommon(SocketsHttpHandler handler, HttpClient client) { ConfigureCommonClient(client); handler.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;