Lack of VPN Profile on Mac
Search first
- [X] I searched and no similar issues were found
What Happened?
Dear Team,
On "service mode", selecting the VPN (experimental) leads to the following dialog:
VPN mode requires administrator privileges. Either relaunch the app as administrator or change service mode.
When I sudo the app (as root), VPN (experimental) works fine. I guess to solve this issue you need to get the permission from user and add a VPN profile (check VPNSubType) in Settings > Network > VPN.
Thanks
Reproduce the Bug
- Change "Service Mode" into "VPN (Experimental)"
- Connect
- Error dialog popup: "VPN mode requires administrator privileges. Either relaunch the app as administrator or change service mode."
Expected Behavior
No response
Version
0.15.15 pre-release & 0.14.20 stable
Platform/OS
macOS
Additional Context
on MacOS 14.3
Relevant log output
No response
Are you willing to submit a PR? If you know how to fix the bug.
- [ ] I'm willing to submit a PR (Thank you!)
Search first
- [x] I searched and no similar issues were found
What Happened?
I have a similar problem as well.
Reproduce the Bug
- Change "Service Mode" into "VPN (Experimental)"
- Connect
- Error dialog popup: "VPN mode requires administrator privileges. Either relaunch the app as administrator or change service mode."
Expected Behavior
A new window should appear, asking for the password.
Version
Any version
Platform/OS
macOS
Additional Context
This is how the Nekoray app handles it:
It uses the osascript command:
# ui/mainwindow.cpp line 1835
vpn_process->start("osascript", {"-e", QString("do shell script \"%1\" with administrator privileges").arg("bash " + scriptPath)});
probably that would be something like this
osascript -e "do shell script \"'/Applications/Hiddify Next.app/Contents/MacOS/Hiddify Next'\" with administrator privileges"
Relevant log output
No response
Are you willing to submit a PR? If you know how to fix the bug.
- [ ] I'm willing to submit a PR
+1
If you don't plan to make changes in code, you can just run app as root in MacOS. To do it hold down the "Control" key and click on the file. From the context menu, select "Open" while still holding down the "Control" key
Otherwise, I think this error happened because we are checking if the mac application is running as root user, just like in linux privilege check implementation. I'm not a mac os developer, but I think this can be fixed by adding "Network capability" to the macos flutter project, and changing the privilege check to something like this if (Platform.isMacOS) {
//Check to see if we have network capability enabled
} so we will get the ability to use VPN mode on macos without running app as root
VPN mode requires administrator privileges. Either relaunch the app as administrator or change service mode.
+1
VPN mode requires administrator privileges. Either relaunch the app as administrator or change service mode.
+1
Open it with admin privilege. See YouTube video for more info
This workaround with sudo permissions prevents sharing the Hiddify VPN connection over my home local network using macOS Internet Sharing (the feature that lets you share your entire VPN connection as a new Wi-Fi network). Similar to iOS, please consider adding VPN profiles for macOS.
Because of this lack, I'm currently using the TestFlight beta (1.1.1) which expires in 8 days. An update is needed to prevent disabling Hiddify for everyone using the TestFlight version.
Cc: @lymanjre
Open it with admin privilege. See YouTube video for more info
please put the link to video