forked from BeyondDimension/SteamTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebProxyHelper.cs
More file actions
32 lines (30 loc) · 1 KB
/
WebProxyHelper.cs
File metadata and controls
32 lines (30 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//using System.Application.Services.Implementation;
//using System.Collections.Generic;
//using System.Net;
//using System.Net.Http;
//using System.Application.Services.CloudService;
//namespace System.Application
//{
// public static class WebProxyHelper
// {
// /// <summary>
// /// 设置全局 HTTP 代理。
// /// </summary>
// public static IWebProxy? Proxy
// {
// set
// {
// GeneralHttpClientFactory.DefaultProxy = value;
// var handlers = new List<HttpMessageHandler>();
// handlers.AddRange(ArchiSteamFarmServiceImpl.GetAllHandlers());
// Add(CloudServiceClientBase.HttpClientHandler);
// GeneralHttpClientFactory.SetProxyToHandler(value, handlers);
// void Add(HttpMessageHandler? item)
// {
// if (item == null) return;
// handlers.Add(item);
// }
// }
// }
// }
//}