mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2026-01-03 01:19:04 +08:00
fix: Fix macOS tun name and ask for root access
This commit is contained in:
parent
196e7789ea
commit
772d58a981
@ -25,6 +25,9 @@ namespace NekoGui {
|
||||
|
||||
QString genTunName() {
|
||||
auto tun_name = "nekoray-tun";
|
||||
#ifdef Q_OS_MACOS
|
||||
tun_name = "utun9";
|
||||
#endif
|
||||
return tun_name;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user