feat: 添加端口代理类型转换工具

This commit is contained in:
2025-01-28 23:43:05 +08:00
parent 68812721a1
commit 5ac2571680

View File

@@ -0,0 +1,16 @@
namespace PortProxyTool;
internal static class PortProxyUtil
{
public static PortProxyType? GetPortProxyTypeByString(string type)
{
return type.ToLower() switch
{
"v4tov4" => PortProxyType.V4ToV4,
"v4tov6" => PortProxyType.V4ToV6,
"v6tov6" => PortProxyType.V6ToV6,
"v6tov4" => PortProxyType.V6ToV4,
_ => null
};
}
}