View Source Wireguardex.DeviceConfig (Wireguardex v0.1.0)

DeviceConfig represents a configuration that can be set on a Wireguard device (interface).

If an interface exists, the configuration is applied on top of the existing interface's settings. Missing settings are not overwritten or set to defaults.

  • public_key The public encryption key to set on the interface.
  • private_key The private encryption key to set on the interface.
  • fwmark The fwmark to set on the interface.
  • listen_port The listening port for incoming connections to set on the interface.
  • peers A list of peers with their own configurations to set on this interface.
  • replace_peers If true, replace existing peer configurations on the interface. If false, modify existing peer configurations or append them to the interface.