mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Add error message for invalid proxy server (#862)
This commit is contained in:
+12
-2
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Cookie = System.Net.Cookie;
|
using Cookie = System.Net.Cookie;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
namespace VRCX
|
namespace VRCX
|
||||||
{
|
{
|
||||||
@@ -71,8 +72,17 @@ namespace VRCX
|
|||||||
if (string.IsNullOrEmpty(ProxyUrl))
|
if (string.IsNullOrEmpty(ProxyUrl))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ProxySet = true;
|
try
|
||||||
Proxy = new WebProxy(ProxyUrl);
|
{
|
||||||
|
ProxySet = true;
|
||||||
|
Proxy = new WebProxy(ProxyUrl);
|
||||||
|
}
|
||||||
|
catch (UriFormatException)
|
||||||
|
{
|
||||||
|
VRCXStorage.Instance.Set("VRCX_ProxyServer", string.Empty);
|
||||||
|
MessageBox.Show("The proxy server URI you used is invalid.\nVRCX will close, please correct the proxy URI.", "Invalid Proxy URI", MessageBoxButton.OK);
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Exit()
|
internal void Exit()
|
||||||
|
|||||||
Reference in New Issue
Block a user