!!! question "自 sing-box 1.11.0 起"
{
  "type": "wireguard",
  "tag": "wg-ep",
  "system": false,
  "name": "",
  "mtu": 1408,
  "address": [],
  "private_key": "",
  "listen_port": 10000,
  "peers": [
    {
      "address": "127.0.0.1",
      "port": 10001,
      "public_key": "",
      "pre_shared_key": "",
      "allowed_ips": [],
      "persistent_keepalive_interval": 0,
      "reserved": [0, 0, 0]
    }
  ],
  "udp_timeout": "",
  "workers": 0,
  ... // 拨号字段
}
!!! note ""
当内容只有一项时,可以忽略 JSON 数组 [] 标签
使用系统设备。
需要特权且不能与已有系统接口冲突。
为系统接口自定义设备名称。
WireGuard MTU。
默认使用 1408。
==必填==
接口的 IPv4/IPv6 地址或地址段的列表。
要分配给接口的 IP(v4 或 v6)地址段列表。
==必填==
WireGuard 需要 base64 编码的公钥和私钥。 这些可以使用 wg(8) 实用程序生成:
wg genkey
echo "private key" || wg pubkey
或 sing-box generate wg-keypair.
==必填==
WireGuard 对等方的列表。
对等方的 IP 地址。
对等方的 WireGuard 端口。
==必填==
对等方的 WireGuard 公钥。
对等方的预共享密钥。
==必填==
对等方的允许 IP 地址。
对等方的持久性保持活动间隔,以秒为单位。
默认禁用。
对等方的保留字段字节。
UDP NAT 过期时间。
默认使用 5m。
WireGuard worker 数量。
默认使用 CPU 数量。
参阅 拨号字段。