Skip to main content

WireGuard

WireGuard is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. Surfboard provides native integration for WireGuard tunnels.

Protocol Standard

Example

Unlike other proxies defined in a single line, WireGuard proxies use a standalone configuration section for details, linked by the section-name in the proxy definition.

[Proxy]
# Definition that references a standalone WireGuard configuration section
wireguard-home = wireguard, section-name = HomeServer

[WireGuard HomeServer]
# Specific interface and peer settings for the WireGuard tunnel
private-key = sDEZLACT3zgNCS0CyClgcBC2eYROqYrwLT4wdtAJj3s=
self-ip = 10.0.2.2
dns-server = 8.8.8.8
mtu = 1280
peer = (public-key = fWO8XS9/nwUQcqnkfBpKeqIqbzclQ6EKP20Pgvzwclg=, allowed-ips = 0.0.0.0/0, endpoint = 192.168.20.6:51820)

Format

[Proxy]
{proxy name} = wireguard, section-name = {section name}

[WireGuard {section name}]
private-key = {private key}
self-ip = {self ip}
dns-server = {dns server ip}
mtu = {mtu size}
peer = (public-key = {public key}, allowed-ips = {allowed ip routes}, endpoint = {endpoint address}, keepalive = {keepalive seconds})

Parameters

NameValueMandatoryNote
proxy name-true
section name-trueSupports domain and IP formats.
private keybase64 encoded formattrue
self ipIPv4 formattrue
dns server ipIPv4 formattrueSupports multiple values separated by commas.
mtu sizeinteger greater than zerotrue
public keybase64 encoded formattrue
allowed ip routesIPv4 route formattrue
endpoint addressIPv4 IP:PORT formattrue
keepalive secondsinteger greater than zerofalse0 means disable keepalive.