mirror of https://github.com/2dust/v2rayN
remove System.Web
parent
08c7396404
commit
e2f9aac1c9
|
@ -1,5 +1,6 @@
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using Microsoft.Win32.TaskScheduler;
|
using Microsoft.Win32.TaskScheduler;
|
||||||
|
using System.Collections.Specialized;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -13,7 +14,6 @@ using System.Security.Cryptography;
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Web;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
@ -302,7 +302,33 @@ namespace v2rayN
|
||||||
|
|
||||||
public static string UrlDecode(string url)
|
public static string UrlDecode(string url)
|
||||||
{
|
{
|
||||||
return HttpUtility.UrlDecode(url);
|
return Uri.UnescapeDataString(url);
|
||||||
|
//return HttpUtility.UrlDecode(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static NameValueCollection ParseQueryString(string query)
|
||||||
|
{
|
||||||
|
var result = new NameValueCollection(StringComparer.OrdinalIgnoreCase);
|
||||||
|
if (IsNullOrEmpty(query))
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var parts = query[1..].Split(new[] { '&' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
foreach (var part in parts)
|
||||||
|
{
|
||||||
|
var keyValue = part.Split(['=']);
|
||||||
|
if (keyValue.Length != 2)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
var key = Uri.UnescapeDataString(keyValue[0]);
|
||||||
|
var val = Uri.UnescapeDataString(keyValue[1]);
|
||||||
|
|
||||||
|
result.Add(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetMD5(string str)
|
public static string GetMD5(string str)
|
||||||
|
|
|
@ -3,7 +3,6 @@ using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace v2rayUpgrade
|
namespace v2rayUpgrade
|
||||||
|
@ -18,7 +17,7 @@ namespace v2rayUpgrade
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
if (args.Length > 0)
|
if (args.Length > 0)
|
||||||
{
|
{
|
||||||
fileName = HttpUtility.UrlDecode(string.Join(" ", args));
|
fileName = Uri.UnescapeDataString(string.Join(" ", args));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue