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
self-ip-v6 = fd00:abcd:1234::2
dns-server = 8.8.8.8
mtu = 1280
peer = (public-key = fWO8XS9/nwUQcqnkfBpKeqIqbzclQ6EKP20Pgvzwclg=, allowed-ips = "0.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}
self-ip-v6 = {self ipv6}
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
self ip v6IPv6 formatfalse
dns server ipIPv4 or IPv6 formattrueUsed to resolve domain destinations through the tunnel on the remote server. Supports multiple values separated by commas.
mtu sizeinteger greater than zerotrue
public keybase64 encoded formattrue
allowed ip routesIPv4 or IPv6 route formattrueUse quotes when specifying multiple routes, e.g., "0.0.0.0/0, ::/0".
endpoint addressIP:PORT formattrueSupports IPv4 and IPv6 addresses.
keepalive secondsinteger greater than zerofalse0 means disable keepalive.