feat: 添加端口代理类型转换工具
This commit is contained in:
16
PortProxyTool/PortProxyUtil.cs
Normal file
16
PortProxyTool/PortProxyUtil.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user