--- title: Main page layout: plain navbar: link: Main icon: home custom_js: # ipaddr.js is buggy: https://github.com/whitequark/ipaddr.js/issues/160. # TODO: revert back to using ipaddr.js if it's fixed? #- https://cdn.jsdelivr.net/npm/ipaddr.js@2.0.1/ipaddr.min.js # This is the "browserified" replacement, ip-address. This bundling procedure # fucking sucks, but it's the best I've got for now. - bundle.js - https://cdn.jsdelivr.net/npm/qrious@4.0.2/dist/qrious.min.js - main.js params: - id: server desc: Server items: - id: server_public name: Public key placeholder: "Server's public key" help: | Query using wg show wg0 public-key example: a - id: server_endpoint name: Endpoint placeholder: "Server's endpoint in the HOST:PORT format" help: | Server's public IP address or a hostname, accessible from the client. Query the current port using wg show wg0 listen-port example: b:123 - id: preshared name: Preshared key placeholder: Preshared key (shared between server and client) help: | Generate using wg genpsk example: c - id: client desc: Client items: - id: client_public name: Public key placeholder: "Client's public key" help: | Generate both the private and the public keys using wg genkey | tee private.key | wg pubkey > public.key example: d - id: client_private name: Private key placeholder: "Client's private key" help: | Unless generated in one go with the public key, generate one using wg genkey example: e - id: client_ipv4 name: IPv4 placeholder: IPv4 address and netmask, like 192.168.123.5/24 help: | IPv4 address to assign to the client and its netmask in the CIDR format. example: 192.168.1.1/24 - id: client_ipv6 name: IPv6 placeholder: IPv6 address and netmask, like fd01:2345:6789::5/48 help: | IPv6 address to assign to the client and its netmask in the CIDR format. example: fd::/48 - id: keepalive name: Keepalive default: 25 placeholder: Seconds between keepalive packets, typically 25 help: | Time to wait between sending keepalive packets, seconds. example: 25 advanced: true ---

WireGuard configuration

This page assumes that you have a WireGuard server configured on interface wg0. You can then generate the new client's keys, feed them to this page and it will show the configuration that can be easily consumed by the new client.

{% assign example_url = '?' %} {% assign first = true %} {% for grp in page.params %} {% for param in grp.items %} {% unless first %} {% capture example_url %}{{ example_url }}&{% endcapture %} {% endunless %} {% assign first = false %} {% capture example_url %}{{ example_url }}{{ param.id }}={{ param.example }}{% endcapture %} {% endfor %} {% endfor %}

An example configuration (with bogus key values) can be seen here.

{% for grp in page.params %}

{{ grp.desc }}

{% for param in grp.items %} {% endfor %}
{% endfor %}