mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-12 19:33:50 +02:00
Use user set proxy for downloading updates (#898)
This commit is contained in:
@@ -110,6 +110,8 @@ namespace VRCX
|
||||
#pragma warning disable SYSLIB0014 // Type or member is obsolete
|
||||
client = new WebClient();
|
||||
#pragma warning restore SYSLIB0014 // Type or member is obsolete
|
||||
if (WebApi.ProxySet)
|
||||
client.Proxy = WebApi.Proxy;
|
||||
client.Headers.Add("user-agent", Program.Version);
|
||||
DownloadProgress = 0;
|
||||
DownloadSize = size;
|
||||
|
||||
@@ -81,7 +81,15 @@ namespace VRCX
|
||||
|
||||
private static string DownloadFile(string fileUrl)
|
||||
{
|
||||
HttpClient client = new HttpClient();
|
||||
HttpClientHandler handler = new HttpClientHandler();
|
||||
|
||||
if(WebApi.ProxySet)
|
||||
{
|
||||
handler.Proxy = WebApi.Proxy;
|
||||
handler.UseProxy = true;
|
||||
}
|
||||
|
||||
HttpClient client = new HttpClient(handler);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user