Skip to content

Commit

Permalink
fix: TAP Mode first time searching adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
chsbuffer committed Oct 19, 2020
1 parent ef8013c commit 30854de
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Netch/Controllers/TUNTAPController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,18 @@ public bool Start(in Mode mode)
}

// 查找并安装 TAP 适配器
if (!SearchTapAdapter() && !AddTap())
if (!SearchTapAdapter())
{
Logging.Error("Tap 适配器安装失败");
return false;
if (!AddTap())
{
Logging.Error("Tap 适配器安装失败");
return false;
}

SearchTapAdapter();
}


SetupRouteTable();

string dns;
Expand Down

0 comments on commit 30854de

Please sign in to comment.