WireGuard Knowledge Patch equips Claude Code with modern implementation semantics for configuring and troubleshooting WireGuard using wg, wg-quick, and wg-quick@.service. It details critical compatibility and security behaviors, such as preserving private keys loaded via PreUp hooks, removing preshared keys during wg syncconf operations, and executing incremental AllowedIPs updates using +/- prefixes. Additionally, it provides definitive patterns for systemd target dependency ordering, resolvconf DNS integration, and sysctl namespace configuration.
主要功能
01In-place peer synchronization and explicit preshared key removal via wg syncconf
02Secure secret injection through PreUp lifecycle hooks without exposing keys in config files
03Container and namespace sysctl routing handling for src_valid_mark
04Incremental AllowedIPs updates using +/- prefixes to avoid replacing entire peer lists
0526 GitHub stars
06Proper systemd service dependency sequencing using wg-quick.target
使用场景
01Orchestrating containerized or systemd-managed WireGuard VPN tunnels and DNS settings
02Dynamically updating AllowedIPs subnets on active WireGuard production servers
03Configuring secret manager integration to inject WireGuard private keys at interface startup