{
"type": "wireguard",
"tag": "wireguard-out",
"server": "127.0.0.1",
"server_port": 1080,
"system_interface": false,
"interface_name": "wg0",
"local_address": [
"10.0.0.2/32"
],
"private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=",
"peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=",
"pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=",
"mtu": 1408,
"network": "tcp",
... // Dial Fields
}
!!! warning ""
WireGuard is not included by default, see [Installation](/#installation).
!!! warning ""
gVisor, which is required by the unprivileged WireGuard is not included by default, see [Installation](/#installation).
==Required==
The server address.
==Required==
The server port.
Use system tun support.
Requires privilege and cannot conflict with system interfaces.
Forced if gVisor not included in the build.
Custom device name when system_interface
enabled.
==Required==
List of IP (v4 or v6) address prefixes to be assigned to the interface.
==Required==
WireGuard requires base64-encoded public and private keys. These can be generated using the wg(8) utility:
wg genkey
echo "private key" || wg pubkey
==Required==
WireGuard peer public key.
WireGuard pre-shared key.
WireGuard MTU. 1408 will be used if empty.
Enabled network
One of tcp
udp
.
Both is enabled by default.
See Dial Fields for details.