Skip to content

Commit

Permalink
update setting
Browse files Browse the repository at this point in the history
  • Loading branch information
AmazingDM committed Feb 16, 2021
1 parent b134130 commit e1efb3b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Netch/Controllers/NFController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public bool Start(in Mode mode)
if (Global.Settings.ProcessNoProxyForTcp)
aio_dial((int)NameList.TYPE_FILTERTCP, "false");

//ICMP
if (Global.Settings.ICMPForward)
aio_dial((int)NameList.TYPE_FILTERICMP, "true");

//设置TCP & UDP 代理服务器
SetServer();

Expand Down Expand Up @@ -114,7 +118,8 @@ public bool Start(in Mode mode)
aio_getPIP(buffer);
string retStr = Encoding.ASCII.GetString(buffer);
retStr = retStr.Substring(0, retStr.IndexOf("\0"));
saveProcessProxyIPLog(retStr);
if (Global.Settings.ProcessProxyIPLog)
saveProcessProxyIPLog(retStr);
}
}).Start();
}
Expand Down Expand Up @@ -377,6 +382,7 @@ public enum NameList
TYPE_FILTERTCP,
TYPE_FILTERUDP,
TYPE_FILTERIP,
TYPE_FILTERICMP,

TYPE_PRINTFILTERIP,

Expand Down
13 changes: 13 additions & 0 deletions Netch/Forms/SettingForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Netch/Forms/SettingForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ private void InitValue()
s => Global.Settings.UDPServer = s,
Global.Settings.UDPServer);

BindCheckBox(ICMPForwardCheckBox,
s => Global.Settings.ICMPForward = s,
Global.Settings.ICMPForward);

#endregion

#region TUN/TAP
Expand Down
5 changes: 5 additions & 0 deletions Netch/Models/Setting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,10 @@ public Setting Clone()
/// 进程模式打印已代理IP日志 5s/次 ProcessProxyIP.log中循环打印
/// </summary>
public bool ProcessProxyIPLog = false;

/// <summary>
/// 进程模式打印已代理IP日志 5s/次 ProcessProxyIP.log中循环打印
/// </summary>
public bool ICMPForward = false;
}
}
Binary file modified binariesMod/Redirector.bin
Binary file not shown.

0 comments on commit e1efb3b

Please sign in to comment.