diff --git a/Netch/Servers/VMess/VMessUtil.cs b/Netch/Servers/VMess/VMessUtil.cs index 8bde4c4bf3..a57d062c0f 100644 --- a/Netch/Servers/VMess/VMessUtil.cs +++ b/Netch/Servers/VMess/VMessUtil.cs @@ -75,16 +75,18 @@ public IEnumerable ParseUri(string text) { var data = new VMess(); - V2rayNSharing vmess; + string s; try { - vmess = JsonSerializer.Deserialize(ShareLink.URLSafeBase64Decode(text.Substring(8))); + s = ShareLink.URLSafeBase64Decode(text.Substring(8)); } catch { return V2rayUtils.ParseVUri(text); } + V2rayNSharing vmess = JsonSerializer.Deserialize(s)!; + data.Remark = vmess.ps; data.Hostname = vmess.add; data.Port = ushort.Parse(vmess.port); diff --git a/Netch/Utils/Utils.cs b/Netch/Utils/Utils.cs index 786bc7bb95..174a6f9e30 100644 --- a/Netch/Utils/Utils.cs +++ b/Netch/Utils/Utils.cs @@ -21,6 +21,8 @@ public static class Utils { public static bool Open(string path) { + if (Global.Testing) + return true; try { Process.Start(new ProcessStartInfo