Skip to content

Hiddify Interferes with Custom WireGuard Interface (wg0) on Same Server #4896

@stuxanUser

Description

@stuxanUser

Issue Description

I'm running Hiddify-Manager on a server alongside a custom WireGuard interface (wg0) for a VPN setup. I'm not sure abot the exact service but I think Hiddify's warp interface is interfering with my wg0 interface, preventing WireGuard handshakes on port 51821/udp.

Environment

  • Hiddify-Manager Version: 10.80.11
  • Operating System: Ubuntu 24.04
  • WireGuard Version: Latest

Steps to Reproduce

  1. Set up Hiddify-Manager with WARP enabled (warp interface active).
  2. Configure wg0 on 51821 with internal IPs 10.0.2.1/24, peers for a Windows client (10.0.2.3/32).
  3. Start wg0 using wg-quick up wg0.
  4. Attempt a WireGuard handshake from the client.
  5. No handshake occurs (wg show wg0 shows no latest handshake).

Expected Behavior

wg0 should establish handshakes on 51821 while warp is active.

Actual Behavior

  • No handshake on wg0.
  • tcpdump shows packets arriving on 51821 but not processed.
  • Stopping Hiddify allows the handshake, confirming warp interference.

Troubleshooting Attempted

  • Added firewall rules: iptables -I INPUT 1 -p udp --dport 51821 -j ACCEPT, nft add rule ip filter INPUT udp dport 51821 accept.
  • Marked packets: iptables -t mangle -A PREROUTING -p udp --dport 51821 -j MARK --set-mark 1.
  • Added routing: ip rule add fwmark 1 lookup 201, ip route add default via 172.31.1.1 dev eth0 table 201, ip route add 10.0.2.0/24 dev wg0 table 201.
  • Tried isolating wg0 in a namespace (wg_ns), set up a veth pair (192.168.1.1/24 and 192.168.1.2/24), added DNAT: iptables -t nat -A PREROUTING -p udp --dport 51821 -j DNAT --to-destination 192.168.1.2.

Request

Please provide a way to configure a custom wg service working alongside with hiddify service.

Logs

  • wg show output:

interface: warp
public key: [redacted]
listening port: 54465
peer: [redacted]
endpoint: 162.159.192.1:2408
allowed ips: 0.0.0.0/0, ::/0
latest handshake: 1 minute, 11 seconds ago
transfer: 59.81 MiB received, 3.55 MiB sent

interface: wg0
public key: [redacted]
private key: (hidden)
listening port: 51821

peer: [redacted]
allowed ips: 10.0.1.0/24

peer: [redacted]
allowed ips: 10.0.2.3/32

Also might be useful to mention that I've tried connecting the wg setup on my vps with another vps with an active wg setup, but same problem happened.

Thank you for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions