mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
Feature: Xray ServerName(sni) Support
Refactor Generate Xray config file
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user