Skip to content

Commit

Permalink
不代理TCP流量设置
Browse files Browse the repository at this point in the history
调整设置界面UI
  • Loading branch information
AmazingDM committed Jan 4, 2021
1 parent 4c8508a commit ce15e94
Show file tree
Hide file tree
Showing 5 changed files with 240 additions and 269 deletions.
17 changes: 16 additions & 1 deletion Netch/Controllers/NFController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ public bool Start(in Mode mode)
#region aio_dial

aio_dial((int) NameList.TYPE_FILTERLOOPBACK, "false");
aio_dial((int) NameList.TYPE_FILTERTCP, "true");
aio_dial((int) NameList.TYPE_TCPLISN, Global.Settings.RedirectorTCPPort.ToString());

if (Global.Settings.ProcessNoProxyForUdp && Global.Settings.ProcessNoProxyForTcp) MessageBoxX.Show("?");

//UDP
if (Global.Settings.ProcessNoProxyForUdp)
{
aio_dial((int) NameList.TYPE_FILTERUDP, "false");
Expand All @@ -68,6 +71,18 @@ public bool Start(in Mode mode)
SetServer(PortType.Both);
}

//TCP
if (Global.Settings.ProcessNoProxyForTcp)
{
aio_dial((int) NameList.TYPE_FILTERTCP, "false");
SetServer(PortType.UDP);
}
else
{
aio_dial((int) NameList.TYPE_FILTERTCP, "true");
SetServer(PortType.Both);
}

if (!CheckRule(mode.FullRule, out var list))
{
MessageBoxX.Show($"\"{string.Join("", list.Select(s => s + "\n"))}\" does not conform to C++ regular expression syntax");
Expand Down
Loading

0 comments on commit ce15e94

Please sign in to comment.