mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-29 19:53:47 +02:00
Implement proxy-server launch argument
Grab proxy-server from launch arguments to match chromium getting it.
This commit is contained in:
@@ -144,6 +144,7 @@ namespace VRCX
|
||||
|
||||
private static async Task LegacyImageUpload(HttpWebRequest request, IDictionary<string, object> options)
|
||||
{
|
||||
request.Proxy = StartupArgs.Proxy;
|
||||
request.Method = "POST";
|
||||
string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
|
||||
request.ContentType = "multipart/form-data; boundary=" + boundary;
|
||||
@@ -188,6 +189,7 @@ namespace VRCX
|
||||
|
||||
private static async Task UploadFilePut(HttpWebRequest request, IDictionary<string, object> options)
|
||||
{
|
||||
request.Proxy = StartupArgs.Proxy;
|
||||
request.Method = "PUT";
|
||||
request.ContentType = options["fileMIME"] as string;
|
||||
var fileData = options["fileData"] as string;
|
||||
@@ -202,6 +204,7 @@ namespace VRCX
|
||||
|
||||
private static async Task ImageUpload(HttpWebRequest request, IDictionary<string, object> options)
|
||||
{
|
||||
request.Proxy = StartupArgs.Proxy;
|
||||
request.Method = "POST";
|
||||
string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
|
||||
request.ContentType = "multipart/form-data; boundary=" + boundary;
|
||||
@@ -255,6 +258,7 @@ namespace VRCX
|
||||
try
|
||||
{
|
||||
var request = WebRequest.CreateHttp((string)options["url"]);
|
||||
request.Proxy = StartupArgs.Proxy;
|
||||
request.CookieContainer = _cookieContainer;
|
||||
request.KeepAlive = true;
|
||||
request.UserAgent = Program.Version;
|
||||
|
||||
Reference in New Issue
Block a user