Snippets:WireGuard prefix delegation

The following WireGuard configuration snippet will allow you to delegate many small prefixes to WireGuard clients from one large prefix routed directly to the WireGuard server:

[Interface]
# Address=???
PrivateKey=[server private key]
ListenPort=51820

[Peer]
PublicKey=[peer 1 public key]
AllowedIPs=100.80.0.2/32,2001:db8:10:1::2/128,100.80.2.0/24,2001:db8:10:200::/56

[Peer]
PublicKey=[peer 2 public key]
AllowedIPs=100.80.0.3/32,2001:db8:10:1::3/128,100.80.3.0/24,2001:db8:10:300::/56

[Peer]
PublicKey=[peer 3 public key]
AllowedIPs=100.80.0.4/32,2001:db8:10:1::4/128,100.80.4.0/24,2001:db8:10:400::/56

[Peer]
PublicKey=[peer 4 public key]
AllowedIPs=100.80.0.5/32,2001:db8:10:1::5/128,100.80.5.0/24,2001:db8:10:500::/56
ip addr add 100.80.0.1/16 dev wg0
ip addr add 2001:db8:10:1::1/48 dev wg0
# ip route add 100.80.0.0/16 dev wg0
# ip route add 2001:db8:10::/48 dev wg0