Add proxy from launch argument to WebApi

Co-authored-by: Nekromateion <43814053+Nekromateion@users.noreply.github.com>
This commit is contained in:
Natsumi
2024-07-17 06:42:33 +12:00
parent 8740905a08
commit a4d03c7e00
5 changed files with 21 additions and 9 deletions

View File

@@ -6,6 +6,7 @@
using System;
using System.Drawing;
using System.Net;
using System.Reflection;
using System.Windows.Forms;
using CefSharp;
@@ -57,6 +58,12 @@ namespace VRCX
Dock = DockStyle.Fill
};
string? proxyUrl = VRCXStorage.Instance.Get("VRCX_ProxyServer");
if (!string.IsNullOrEmpty(proxyUrl))
{
WebApi.Proxy = new WebProxy(proxyUrl);
}
Browser.IsBrowserInitializedChanged += (A, B) =>
{
if (Program.LaunchDebug)