# services.proxy-suite.amneziaWg AmneziaWG client profiles, as a global VPN or as outbounds. Part of the [proxy-suite options reference](./index.md). ## Options - amneziaWg - [enable](#services-proxy-suite-amneziawg-enable) - [kernelModulePackage](#services-proxy-suite-amneziawg-kernelmodulepackage) - [profiles](#services-proxy-suite-amneziawg-profiles) - `` - [allowConfigHooks](#services-proxy-suite-amneziawg-profiles-name-allowconfighooks) - [asOutbound](#services-proxy-suite-amneziawg-profiles-name-asoutbound) - [autostart](#services-proxy-suite-amneziawg-profiles-name-autostart) - [configFile](#services-proxy-suite-amneziawg-profiles-name-configfile) - [domainStrategy](#services-proxy-suite-amneziawg-profiles-name-domainstrategy) - [endpoint](#services-proxy-suite-amneziawg-profiles-name-endpoint) - [interfaceName](#services-proxy-suite-amneziawg-profiles-name-interfacename) - [settings](#services-proxy-suite-amneziawg-profiles-name-settings) - [addresses](#services-proxy-suite-amneziawg-profiles-name-settings-addresses) - [dns](#services-proxy-suite-amneziawg-profiles-name-settings-dns) - [listenPort](#services-proxy-suite-amneziawg-profiles-name-settings-listenport) - [mtu](#services-proxy-suite-amneziawg-profiles-name-settings-mtu) - [obfuscation](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation) - [contentPaddingAddition](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-contentpaddingaddition) - [disableCookies](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-disablecookies) - [h1](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-h1) - [h2](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-h2) - [h3](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-h3) - [h4](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-h4) - [headerProtectionKey](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-headerprotectionkey) - [headerProtectionKeyFile](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-headerprotectionkeyfile) - [i1](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-i1) - [i2](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-i2) - [i3](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-i3) - [i4](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-i4) - [i5](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-i5) - [jc](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-jc) - [jmax](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-jmax) - [jmin](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-jmin) - [keepaliveTimeout](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-keepalivetimeout) - [maxHandshakeAttempts](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-maxhandshakeattempts) - [randomTrailers](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-randomtrailers) - [rejectAfterTime](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-rejectaftertime) - [rekeyAfterTime](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-rekeyaftertime) - [rekeyTimeout](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-rekeytimeout) - [s1](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-s1) - [s2](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-s2) - [s3](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-s3) - [s4](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscation-s4) - [obfuscationFile](#services-proxy-suite-amneziawg-profiles-name-settings-obfuscationfile) - [peers](#services-proxy-suite-amneziawg-profiles-name-settings-peers) - item - [advancedSecurity](#services-proxy-suite-amneziawg-profiles-name-settings-peers-advancedsecurity) - [allowedIPs](#services-proxy-suite-amneziawg-profiles-name-settings-peers-allowedips) - [endpoint](#services-proxy-suite-amneziawg-profiles-name-settings-peers-endpoint) - [persistentKeepalive](#services-proxy-suite-amneziawg-profiles-name-settings-peers-persistentkeepalive) - [presharedKey](#services-proxy-suite-amneziawg-profiles-name-settings-peers-presharedkey) - [presharedKeyFile](#services-proxy-suite-amneziawg-profiles-name-settings-peers-presharedkeyfile) - [publicKey](#services-proxy-suite-amneziawg-profiles-name-settings-peers-publickey) - [privateKey](#services-proxy-suite-amneziawg-profiles-name-settings-privatekey) - [privateKeyFile](#services-proxy-suite-amneziawg-profiles-name-settings-privatekeyfile) - [table](#services-proxy-suite-amneziawg-profiles-name-settings-table) - [vpn](#services-proxy-suite-amneziawg-profiles-name-vpn) - [vpnContainer](#services-proxy-suite-amneziawg-profiles-name-vpncontainer) - [vpnFile](#services-proxy-suite-amneziawg-profiles-name-vpnfile) - runtime - [enable](#services-proxy-suite-amneziawg-runtime-enable) - [interfaceName](#services-proxy-suite-amneziawg-runtime-interfacename) - [outboundKind](#services-proxy-suite-amneziawg-runtime-outboundkind) - [serverUdpPorts](#services-proxy-suite-amneziawg-serverudpports) - [toolsPackage](#services-proxy-suite-amneziawg-toolspackage) - [userspacePackage](#services-proxy-suite-amneziawg-userspacepackage) - [wireproxyPackage](#services-proxy-suite-amneziawg-wireproxypackage) ## services\.proxy-suite\.amneziaWg\.enable Whether to enable AmneziaWG client profiles\. **Type:** boolean\ **Default:** `false` ## services\.proxy-suite\.amneziaWg\.kernelModulePackage AWG 3\.1 kernel module package\. ` null `: userspace only\. **Type:** null or package\ **Default:** ` amneziawg ` from ` boot.kernelPackages ` on NixOS, ` null ` elsewhere ## services\.proxy-suite\.amneziaWg\.profiles AmneziaWG client profiles, by name\. Each sets exactly one of ` configFile `, ` vpnFile `, ` vpn ` or ` settings `\. Only one global profile can run at a time\. When handshakes go unanswered, a profile switches to a new source port on its own\. Setting ` settings.listenPort ` pins the port and turns this off\. **Type:** attribute set of (submodule)\ **Default:** `{ }` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.allowConfigHooks Let imported configs run wg-quick hooks (PostUp etc\.) or use SaveConfig\. Only for trusted configs\. **Type:** boolean\ **Default:** `false` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.asOutbound Use the profile as a proxy outbound, tagged with its name, instead of a global VPN\. It then always runs and leaves the host’s routes and DNS alone\. Needs ` proxy.enable `\. - “singBox”: plain WireGuard in sing-box\. AmneziaWG obfuscation is dropped, with a warning\. - “userspace”: wireproxy with AmneziaWG obfuscation\. Needs no root, so it is the only mode on home-manager and Nix-on-Droid\. Its endpoint is resolved by the system resolver, so use an IP if that resolver cannot reach the name\. - “interface”: a real AmneziaWG interface without routes, which the outbound binds to\. On sing-box, its DNS also goes through the tunnel\. **Type:** null or one of “singBox”, “userspace”, “interface”\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.autostart Start this profile at boot\. Only one profile can autostart\. **Type:** boolean\ **Default:** `false` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.configFile File with an AmneziaWG \.conf\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.domainStrategy Which address family the outbound dials a name over first\. Ignored with ` asOutbound = "userspace" `\. ` null `: the backend’s default\. **Type:** null or one of “prefer_ipv4”, “prefer_ipv6”, “ipv4_only”, “ipv6_only”\ **Default:** `null`\ **Example:** `"prefer_ipv6"` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.endpoint host:port (IPv6 in brackets) that replaces the first peer’s endpoint\. **Type:** null or string matching the pattern (\\\[\[0-9A-Fa-f:\.]+]|\[^]:\[]+):\[0-9]+\ **Default:** `null`\ **Example:** `"162.159.192.1:500"` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.interfaceName Interface name, at most 15 characters\. **Type:** string matching the pattern ^\[A-Za-z0-9_\.-]{1,15}$\ **Default:** `"awg-"` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings The client config written in Nix, instead of a file\. **Type:** null or (submodule)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.addresses Interface addresses\. **Type:** list of string\ **Default:** `[ ]`\ **Example:** `[ "10.8.0.2/32" ]` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.dns DNS servers used while this profile is active\. **Type:** list of string\ **Default:** `[ ]` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.listenPort Local UDP port\. **Type:** null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.mtu Interface MTU\. **Type:** null or (unsigned integer, meaning >=0)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation AmneziaWG 1\.x through 3\.x obfuscation parameters\. **Type:** submodule\ **Default:** `{ }` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.contentPaddingAddition AWG 3 content-padding addition or range\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.disableCookies AWG 3 cookie suppression (DisableCookies)\. **Type:** null or boolean\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.h1 Handshake-init header or range (H1)\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.h2 Handshake-response header or range (H2)\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.h3 Cookie-reply header or range (H3)\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.h4 Transport-message header or range (H4)\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.headerProtectionKey AWG 3 header-protection key\. Ends up in the Nix store; prefer ` headerProtectionKeyFile `\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.headerProtectionKeyFile File with the AWG 3 header-protection key\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.i1 First custom signature packet (I1)\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.i2 Second custom signature packet (I2)\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.i3 Third custom signature packet (I3)\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.i4 Fourth custom signature packet (I4)\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.i5 Fifth custom signature packet (I5)\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.jc Junk packet count (Jc)\. **Type:** null or (unsigned integer, meaning >=0)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.jmax Maximum junk packet size (Jmax)\. **Type:** null or (unsigned integer, meaning >=0)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.jmin Minimum junk packet size (Jmin)\. **Type:** null or (unsigned integer, meaning >=0)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.keepaliveTimeout AWG 3 keepalive timeout or range\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.maxHandshakeAttempts AWG 3 maximum handshake attempts or range\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.randomTrailers AWG 3 random transport trailers (RandomTrailers)\. **Type:** null or boolean\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.rejectAfterTime AWG 3 reject-after interval or range\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.rekeyAfterTime AWG 3 rekey interval or range\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.rekeyTimeout AWG 3 rekey timeout or range\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.s1 Handshake-init padding (S1)\. **Type:** null or (unsigned integer, meaning >=0)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.s2 Handshake-response padding (S2)\. **Type:** null or (unsigned integer, meaning >=0)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.s3 Cookie-reply padding (S3)\. **Type:** null or (unsigned integer, meaning >=0)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscation\.s4 Transport-message padding (S4)\. **Type:** null or (unsigned integer, meaning >=0)\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.obfuscationFile File with secret obfuscation settings as JSON, using the same fields as ` obfuscation ` (except ` headerProtectionKeyFile `)\. It is merged with ` obfuscation ` at startup and never enters the Nix store\. A field set in both places is an error\. Restart the profile after changing the file\. **Type:** null or string\ **Default:** `null`\ **Example:** `"/run/secrets/awg-obfuscation.json"` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.peers AmneziaWG peers\. **Type:** list of (submodule)\ **Default:** `[ ]` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.peers\.\*\.advancedSecurity AWG AdvancedSecurity setting\. **Type:** null or boolean\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.peers\.\*\.allowedIPs IP ranges routed to and accepted from this peer\. **Type:** list of string\ **Default:** `[ ]`\ **Example:** `[ "0.0.0.0/0" "::/0" ]` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.peers\.\*\.endpoint Peer address, as host:port\. **Type:** null or string\ **Default:** `null`\ **Example:** `"vpn.example.com:51820"` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.peers\.\*\.persistentKeepalive Keepalive interval in seconds, or an AWG 3 range\. **Type:** null or unsigned integer, meaning >=0, or string matching the pattern ^(\[0-9]+|\[0-9]±\[0-9]+|\\(off\\))$\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.peers\.\*\.presharedKey Peer preshared key\. Ends up in the Nix store; prefer ` presharedKeyFile `\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.peers\.\*\.presharedKeyFile File with the peer preshared key\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.peers\.\*\.publicKey Peer public key\. **Type:** string matching the pattern \[^\[:space:]]+ ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.privateKey Client private key\. Ends up in the Nix store; prefer ` privateKeyFile `\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.privateKeyFile File with the client private key\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.settings\.table Routing table: a name or number, “auto” or “off”\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.vpn A vpn:// export\. Ends up in the Nix store; prefer ` vpnFile `\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.vpnContainer Which container to take from a vpn:// export that holds several\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.profiles\.\\.vpnFile File with a vpn:// export\. **Type:** null or string\ **Default:** `null` ## services\.proxy-suite\.amneziaWg\.runtime\.enable Let ` proxy-ctl ` add configs and ` vpn:// ` links without a rebuild: ` proxy-ctl awg add ` for a global profile (root hosts only), and ` proxy-ctl proxy outbounds add ` for an outbound, which runs in wireproxy (needs ` proxy.enable `)\. wg-quick hooks such as ` PostUp ` are always refused in them\. With this on, ` profiles ` may be empty\. **Type:** boolean\ **Default:** `true` ## services\.proxy-suite\.amneziaWg\.runtime\.interfaceName Interface of the global profiles added at runtime\. Only one of them runs at a time, so they share it\. **Type:** string matching the pattern ^\[A-Za-z0-9_\.-]{1,15}$\ **Default:** `"awg-rt"` ## services\.proxy-suite\.amneziaWg\.runtime\.outboundKind How an outbound added with ` proxy-ctl proxy outbounds add ` runs, unless it says (` --interface `, ` --userspace `): in wireproxy, or as an AmneziaWG interface of its own (root hosts only), which apps can also be run through with ` proxy-ctl apps run --via `\. **Type:** one of “userspace”, “interface”\ **Default:** `"userspace"` ## services\.proxy-suite\.amneziaWg\.serverUdpPorts UDP ports of services on this host that others reach, whose packets a global profile leaves on the host’s own routes\. A reply from a socket bound to every address would otherwise leave through the tunnel, from the tunnel’s address\. The UDP inbound listeners and, on NixOS, the ports the firewall opens are included already\. **Type:** list of (16 bit unsigned integer; between 0 and 65535 (both inclusive) or string matching the pattern \[0-9]±\[0-9]+)\ **Default:** `[ ]`\ **Example:** `[ 3478 "49152-65535" ]` ## services\.proxy-suite\.amneziaWg\.toolsPackage AWG 3\.1 package with ` awg ` and ` awg-quick `\. **Type:** package\ **Default:** proxy-suite’s patched ` amneziawg-tools ` (` pkgs/amneziawg.nix `) ## services\.proxy-suite\.amneziaWg\.userspacePackage AWG 3\.1 userspace implementation, used when the kernel module is unavailable\. **Type:** package\ **Default:** proxy-suite’s patched ` amneziawg-go ` (` pkgs/amneziawg.nix `) ## services\.proxy-suite\.amneziaWg\.wireproxyPackage wireproxy build with AWG 3\.1, used by profiles with ` asOutbound = "userspace" `\. **Type:** package\ **Default:** proxy-suite’s ` wireproxy-awg ` (` pkgs/wireproxy-awg.nix `)