fix: Fix macOS tun name and ask for root access

This commit is contained in:
unknown 2024-06-26 18:40:24 +03:30
parent 196e7789ea
commit 772d58a981
No known key found for this signature in database
GPG Key ID: C2CA486E4F771093
2 changed files with 7 additions and 0 deletions

View File

@ -25,6 +25,9 @@ namespace NekoGui {
QString genTunName() {
auto tun_name = "nekoray-tun";
#ifdef Q_OS_MACOS
tun_name = "utun9";
#endif
return tun_name;
}

View File

@ -752,6 +752,10 @@ void MainWindow::neko_set_spmode_vpn(bool enable, bool save) {
on_menu_exit_triggered();
}
#endif
#ifdef Q_OS_MACOS
MessageBoxWarning("Need administrator privilege", "Enabling TUN mode requires elevated privileges, please run the app as root.");
#endif
neko_set_spmode_FAILED
}
}