From ddd1ca5fac4b66f5501afc6f012b7159f90255c4 Mon Sep 17 00:00:00 2001 From: Connection Refused Date: Mon, 29 Mar 2021 23:34:20 +0800 Subject: [PATCH] Update NFController --- Netch/Controllers/NFController.cs | 7 ++++--- Netch/Interops/RedirectorInterop.cs | 9 ++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Netch/Controllers/NFController.cs b/Netch/Controllers/NFController.cs index 6a32627c..62bbdf8c 100644 --- a/Netch/Controllers/NFController.cs +++ b/Netch/Controllers/NFController.cs @@ -25,14 +25,15 @@ namespace Netch.Controllers { CheckDriver(); - Dial(NameList.TYPE_FILTLOP, "false"); + Dial(NameList.TYPE_FILTERLOOPBACK, "false"); + Dial(NameList.TYPE_FILTERICMP, "true"); var p = PortHelper.GetAvailablePort(); Dial(NameList.TYPE_TCPLISN, p.ToString()); Dial(NameList.TYPE_UDPLISN, p.ToString()); // Server - Dial(NameList.TYPE_FILTUDP, (Global.Settings.Redirector.ProxyProtocol != PortType.TCP).ToString().ToLower()); - Dial(NameList.TYPE_FILTTCP, (Global.Settings.Redirector.ProxyProtocol != PortType.UDP).ToString().ToLower()); + Dial(NameList.TYPE_FILTERUDP, (Global.Settings.Redirector.ProxyProtocol != PortType.TCP).ToString().ToLower()); + Dial(NameList.TYPE_FILTERTCP, (Global.Settings.Redirector.ProxyProtocol != PortType.UDP).ToString().ToLower()); dial_Server(Global.Settings.Redirector.ProxyProtocol); // Mode Rule diff --git a/Netch/Interops/RedirectorInterop.cs b/Netch/Interops/RedirectorInterop.cs index aa60bad4..25b3388f 100644 --- a/Netch/Interops/RedirectorInterop.cs +++ b/Netch/Interops/RedirectorInterop.cs @@ -7,12 +7,15 @@ namespace Netch.Interops { public enum NameList { - TYPE_FILTLOP, - TYPE_FILTTCP, - TYPE_FILTUDP, + TYPE_FILTERLOOPBACK, + TYPE_FILTERICMP, + TYPE_FILTERTCP, + TYPE_FILTERUDP, + TYPE_CLRNAME, TYPE_ADDNAME, TYPE_BYPNAME, + TYPE_DNSHOST, TYPE_TCPLISN,