mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6350] [Question]: Is Wireguard in kernel mode or userspce mode in 3x-ui 3.7.0 ? #4311
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hussain0011 on GitHub (Aug 28, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6350
What are you trying to do?
Is Wireguard in kernel mode or userspace mode in 3x-ui 3.7.0 ?
What have you already tried?
No response
3x-ui version
3.7.0
How did you install 3x-ui?
install.sh script
Operating system
ubuntu 24.04
Screenshots or config snippets
No response
Before submitting
@github-actions[bot] commented on GitHub (Aug 28, 2026):
Userspace, in both cases. 3x-ui 3.7.0 has no kernel-mode WireGuard path at all — no kernel module, no DKMS build, and no
wg/wg-quickinvolvement on the host.There are two separate WireGuard-family features in the panel, and they take two different userspace routes:
1. AmneziaWG inbounds (protocol
amneziawg) — embedded in the panel processinternal/amneziawgnet/netstack.go:1:These inbounds are deliberately kept out of the generated Xray config —
internal/web/service/xray.go:177:and are reconciled instead by the
amneziawg_jobcron every 10s (docs/architecture.md:376). Each peer's decapsulated traffic then relays into its own loopback SOCKS5 Xray inbound (injectAmneziawgnetSocks, called atinternal/web/service/xray.go:383), which is how per-client stats, sniffing and routing still work.This fork did originally ship a kernel-module implementation, and it was removed.
internal/amneziawg/instance.go:4:2. Plain WireGuard inbounds/outbounds (protocol
wireguard) — inside the Xray-core child processThe panel treats these as ordinary Xray objects: peers are rewritten into the shape xray-core's wireguard inbound expects at
internal/database/model/model.go:364(case WireGuard:→WireguardClientsToPeers), and users are added over Xray's gRPC handler API (internal/xray/api.go:623,case "wireguard":). Xray-core's ownproxy/wireguardis likewise userspace —internal/amneziawgnet/netstack.go:38describes its stack as "the same approach amneziawg-go's own tun/netstack package and xray-core's proxy/wireguard/netstack.go both take", andgolang.zx2c4.com/wireguard(wireguard-go) is present ingo.mod:110as an indirect dependency pulled in by xray-core. The same applies to the WARP / Nord / PIA WireGuard outbounds.What this means in practice
wg showorip linkon the host — the tunnel never becomes a kernel network interface.wireguard-tools, no DKMS, no Secure Boot signing problem, and it behaves the same inside a container as on bare metal. (TheNET_ADMIN/NET_RAWcapabilities indocker-compose.ymlare for fail2ban's iptables IP-limit enforcement, not for WireGuard.)The AmneziaWG page states this too: https://docs.sanaei.dev/en/docs/config/amneziawg
One note on versions: v3.7.0 is the current latest release (2026-08-24) and the default branch sits at that tag, so everything above is read from exactly the code you are running.
Verdict: Not a bug (expected behaviour)
This reply was generated automatically; a maintainer may follow up.