[Windows] VPN (TUN) mode fails in 5.5.5: fork/exec HiddifyCli.exe "The requested operation requires elevation"

Open
#2,501 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
dart

Research direction

Start by tracing how Windows VPN (TUN) mode launches HiddifyCli.exe and compare that path with the working proxy mode. The issue names no source files or tests, so first locate the Windows process launch and elevation handling; confirm the fix by connecting in VPN mode from a normally started app and checking that the elevation request or helper allows the TUN core to start.

Written by the indexing model from the issue text.

Description

bug desktop tun need_attention useful windows

Description

On Windows, Hiddify 5.5.5 cannot connect in VPN (TUN) mode at all. Proxy (system proxy) mode works fine with the same profile; only VPN mode fails.

When trying to connect in VPN mode, the app stays on "Connecting..." and then shows an "Unexpected failure" dialog with:

Bad state: fork/exec C:\Program Files\Hiddify\HiddifyCli.exe: The requested operation requires elevation.

After dismissing the dialog the main screen shows "Connection failed, tap to retry".

It looks like the app tries to launch HiddifyCli.exe (which needs administrator rights for TUN) directly from a non-elevated process, instead of requesting elevation (UAC) or going through an elevated helper/service, so Windows rejects the process creation (ERROR_ELEVATION_REQUIRED, code 740).

Steps to reproduce

  1. Install Hiddify 5.5.5 on Windows (default path C:\Program Files\Hiddify).
  2. Start the app normally (not "Run as administrator").
  3. Import any working subscription/profile.
  4. Set the service mode to VPN.
  5. Tap connect.

Expected behavior

The app should request elevation (UAC prompt) or use an elevated helper, start the TUN core, and connect, as it does in proxy mode.

Actual behavior

Connection never starts; "Unexpected failure: Bad state: fork/exec C:\Program Files\Hiddify\HiddifyCli.exe: The requested operation requires elevation." is shown, then "Connection failed".

Environment

  • App version: 5.5.5
  • Platform: Windows (desktop)
  • Mode: VPN (TUN) fails, proxy works

Notes

  • Possible workaround to verify: running Hiddify as administrator.
  • Related (closed): #2402 (similar error 740 on relaunch after update).
Dominant language
Dart
Stars
33.9k
Forks
3.2k
Avg merge
9h 34m
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hiddify/hiddify-app

All issues in hiddify/hiddify-app

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.