Node HandbookNODE HANDBOOK
TUN privilege

Hiddify: operation not permitted

The core started, parsed its configuration, and then failed at the one step that needs rights the process does not have. Every platform refuses in the same words and for a different reason.

Last updated: 2026-11-24 · Every error string on this page was reproduced on a real client.

What the permission is for

A proxy client in TUN mode does not intercept traffic by asking applications nicely. It creates a virtual network interface, takes the default route, and reads packets from that interface. Creating an interface is a kernel operation that requires elevated rights on every operating system, and the generic refusal surfaces as operation not permitted — EPERM, with no indication of which check failed.

Two facts follow. First, the configuration is probably fine: the core reached the point of creating the device. Second, the fix is platform-specific, so identify the platform before trying anything.

Linux: capability, not root

Two separate requirements are often conflated. The process needs CAP_NET_ADMIN to create and configure an interface, and the device node /dev/net/tun must exist. A process can satisfy one and not the other.

ls -l /dev/net/tun
getcap ./hiddify-core
capsh --print | grep -i net_admin

If the device node is missing, the kernel module is not loaded or the container was started without it:

sudo modprobe tun
ls -l /dev/net/tun

If the node exists and it still refuses, the process lacks the capability. Running as root grants it but is the blunt instrument; granting the single capability is the surgical version:

sudo setcap cap_net_admin,cap_net_raw+ep /path/to/hiddify-core

Filesystems mounted nosuid ignore file capabilities, which is common for home directories on some distributions. In that case the binary must live elsewhere, or be started through a service unit that grants the capability.

Inside a container

Containers start with a reduced capability set and no device nodes by default, so the same binary that works on the host fails inside. Both must be added explicitly — capabilities without the device, or the device without capabilities, still fails:

docker run --cap-add NET_ADMIN --device /dev/net/tun ...

Read-only root filesystems add a third failure: the core may need to write to /etc/resolv.conf when it takes over DNS. If the mount is read-only, the interface is created and the resolver step fails, which produces a different message but the same overall symptom.

Windows: the driver, not the user

Windows has no equivalent capability model. TUN is provided by the Wintun driver, and creating an adapter requires that driver to be installed and loadable. An administrator account is not sufficient on its own.

  • The driver ships alongside the client; if it was blocked by security software or removed by a cleanup tool, adapter creation fails with a permission-style error rather than a missing-driver message.
  • wintun.dll must be the architecture matching the process — a 64-bit core loading a 32-bit DLL fails in a way that mentions access.
  • Endpoint protection that intercepts driver loads will block it silently and log the block in its own console, not in the client's.

Check whether an adapter exists at all. If the client claims to be in TUN mode and no adapter is present in the network connections list, the failure happened before the interface was created:

Get-NetAdapter | Where-Object Name -like "*wintun*"

Reinstalling the client restores the driver. Running the client elevated is not required once the driver is present, and does not substitute for it when it is missing.

macOS: approval, not permission

macOS requires a network extension entitlement and explicit user approval. The refusal arrives as a permission error but the mechanism is a consent dialog the user may never have seen, or dismissed.

Check System Settings under Privacy and Security for a pending network extension approval, and check that the app has not been blocked from loading system extensions. A client copied from a download that Gatekeeper quarantined can pass the first launch and fail at interface creation, because the extension never loaded.

Approval is per application, and updating the app can require it again if the signature changed. The symptom is identical both times.

Android: another VPN is already active

On Android the client uses the system VpnService, and only one such service can be active at a time. A second client asking for it gets a refusal that reads like a permission problem. If another VPN, a private DNS app, or a firewall app is running, the new one cannot prepare its interface.

The check is simple: disable every other VPN and firewall app, then start the client. If it works, the conflict was the cause and no permission is missing.

Confirming you fixed the right thing

Do not judge by the absence of the message. Judge by the interface: a TUN device that exists, has an address, and carries the default route. If the message is gone but the interface is missing, a different error is now being swallowed.

ip addr show
ip route show default

Both lines must mention the interface the client created. That is the evidence that the permission was actually granted, rather than the code path being skipped.

Frequently asked

Does running as administrator fix it on Windows?

Only if the missing piece were rights. Windows needs the Wintun driver; elevation does not create it. If no adapter appears in the network list, the driver is the issue.

Is setcap persistent across updates?

No. File capabilities are stored on the inode, so replacing the binary removes them. Every update requires applying them again, which is why a systemd unit with the capability declared is more durable.

Why does it work in a VM but not in Docker?

Containers drop capabilities and do not pass device nodes by default. Both must be granted explicitly; the host's own kernel support is not enough.

Can I skip TUN and still proxy everything?

Yes, by using system proxy mode instead, which needs no elevation. It covers applications that honour the system setting and misses the rest, which is often why TUN was chosen.

The message disappeared but nothing is proxied. Why?

Because the failure moved. Check that the interface exists and holds the default route; if it does not, the client is running in a mode you did not intend.