hiddify-next icon indicating copy to clipboard operation
hiddify-next copied to clipboard

Lack of VPN Profile on Mac

Open sghiaseddin opened this issue 2 years ago • 8 comments

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

  1. Change "Service Mode" into "VPN (Experimental)"
  2. Connect
  3. 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 Screenshot 1402-11-28 at 12 15 56 at night

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!)

sghiaseddin avatar Feb 16 '24 21:02 sghiaseddin

Search first

  • [x]  I searched and no similar issues were found

What Happened?

I have a similar problem as well.

Reproduce the Bug

  1. Change "Service Mode" into "VPN (Experimental)"
  2. Connect
  3. 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: Screenshot 2024-02-20 at 6 10 12 PM

# 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

anon2334 avatar Feb 20 '24 15:02 anon2334

+1

fantik11 avatar Feb 27 '24 18:02 fantik11

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

fantik11 avatar Feb 29 '24 15:02 fantik11

VPN mode requires administrator privileges. Either relaunch the app as administrator or change service mode.

+1

aningdev avatar Mar 01 '24 05:03 aningdev

VPN mode requires administrator privileges. Either relaunch the app as administrator or change service mode.

+1

danialkj avatar Mar 16 '24 09:03 danialkj

Open it with admin privilege. See YouTube video for more info

lymanjre avatar Apr 27 '24 15:04 lymanjre

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

alircxa avatar Jun 11 '24 08:06 alircxa

Open it with admin privilege. See YouTube video for more info

please put the link to video

samadariyan avatar Jul 20 '24 13:07 samadariyan