Skip to content

Commit

Permalink
Add a prompt for not setting a password when open Tun on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jan 15, 2025
1 parent a6479fe commit 77b15cd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,12 @@ private async Task DoEnableTun(bool c)
Locator.Current.GetService<MainWindowViewModel>()?.RebootAsAdmin();
return;
}
//else if (Utils.IsLinux())
//{
// NoticeHandler.Instance.SendMessageAndEnqueue(ResUI.TbSettingsLinuxSudoPasswordIsEmpty);
//}
else if (Utils.IsOSX())
{
_config.TunModeItem.EnableTun = false;
NoticeHandler.Instance.SendMessageAndEnqueue(ResUI.TbSettingsLinuxSudoPasswordIsEmpty);
return;
}
}
await ConfigHandler.SaveConfig(_config);
Locator.Current.GetService<MainWindowViewModel>()?.Reload();
Expand Down

0 comments on commit 77b15cd

Please sign in to comment.