# WireGuard Configuration Template with Performance Optimizations
# This template includes MTU, BBR, and keepalive settings proven to improve performance

[Interface]
# Basic WireGuard configuration
PrivateKey = YOUR_PRIVATE_KEY_HERE
Address = 10.0.0.1/24
ListenPort = 51820

# MTU Optimization
# Set to 1300 for best balance of performance and compatibility
# Alternative: 1280 (most conservative) or 1350 (if network quality is good)
PostUp = ip link set dev wg0 mtu 1300

SaveConfig = false

[Peer]
# Remote peer configuration
PublicKey = REMOTE_PEER_PUBLIC_KEY_HERE
AllowedIPs = 10.0.0.2/32

# Endpoint configuration (optional - for server-to-client)
Endpoint = REMOTE_PEER_IP:REMOTE_PEER_PORT

# Persistent keepalive (essential for NAT traversal and connection stability)
# Sends a keepalive packet every 25 seconds to keep NAT mappings alive
PersistentKeepalive = 25

# Additional optimization notes:
# 1. BBR congestion control should be enabled system-wide (see BBR setup below)
# 2. Ensure both client and server have compatible MTU settings
# 3. Monitor performance with: ping -c 10 10.0.0.2
