mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-10 22:45:00 +03:00
Fix (#9614)
This commit is contained in:
@@ -324,6 +324,29 @@ public class Utils
|
|||||||
.ReplaceLineBreaks(",");
|
.ReplaceLineBreaks(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string ParseProcess(string text)
|
||||||
|
{
|
||||||
|
if (text.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
if (text.StartsWith('"'))
|
||||||
|
{
|
||||||
|
text = text[1..];
|
||||||
|
}
|
||||||
|
if (text.EndsWith('"'))
|
||||||
|
{
|
||||||
|
text = text[..^1];
|
||||||
|
}
|
||||||
|
return List2String(text.Replace(",", ",")
|
||||||
|
.Replace("\\", "/")
|
||||||
|
.ReplaceLineBreaks(",")
|
||||||
|
.Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||||
|
.Select(x => x.TrimEx())
|
||||||
|
.Where(x => x.IsNotEmpty())
|
||||||
|
.ToList());
|
||||||
|
}
|
||||||
|
|
||||||
public static List<string> GetEnumNames<TEnum>() where TEnum : Enum
|
public static List<string> GetEnumNames<TEnum>() where TEnum : Enum
|
||||||
{
|
{
|
||||||
return Enum.GetValues(typeof(TEnum))
|
return Enum.GetValues(typeof(TEnum))
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class RoutingRuleDetailsViewModel : MyReactiveObject
|
|||||||
{
|
{
|
||||||
Domain = Utils.Convert2Comma(Domain);
|
Domain = Utils.Convert2Comma(Domain);
|
||||||
IP = Utils.Convert2Comma(IP);
|
IP = Utils.Convert2Comma(IP);
|
||||||
Process = Utils.Convert2Comma(Process);
|
Process = Utils.ParseProcess(Process);
|
||||||
|
|
||||||
if (AutoSort)
|
if (AutoSort)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user