Feature: Xray ServerName(sni) Support

Refactor Generate Xray config file
This commit is contained in:
ChsBuffer
2021-07-05 20:29:45 +08:00
parent 4836e4c913
commit e3b1ae0621
9 changed files with 268 additions and 487 deletions

View File

@@ -72,5 +72,15 @@ namespace Netch.Utils
{
return value.Split(separator, StringSplitOptions.RemoveEmptyEntries);
}
public static string? ValueOrDefault(this string? value)
{
return string.IsNullOrWhiteSpace(value) ? null : value;
}
public static string[]? SplitOrDefault(this string? value)
{
return !string.IsNullOrWhiteSpace(value) ? value.Split(',') : default;
}
}
}