WrapGuard simplifies the integration of WireGuard VPN into any application by transparently routing all network traffic without requiring container privileges or kernel modules. With pure userspace operation and standard configuration files, it offers an efficient and accessible solution for achieving secure networking.
WrapGuard is a userspace proxy designed to seamlessly route all network traffic through a WireGuard VPN without the need for container privileges or kernel modules. This solution simplifies the process of securing network connections for any application leveraging the robust WireGuard protocol.
LD_PRELOAD to transparently intercept all network calls, providing a smooth integration with existing applications.You can easily route outgoing connections through WireGuard with the following command:
wrapguard --config=~/wg0.conf -- curl https://icanhazip.com
For incoming connections, use:
wrapguard --config=~/wg0.conf -- node -e 'http.createServer().listen(8080)'
WrapGuard utilizes standard WireGuard config files, which follow this format:
[Interface]
PrivateKey = <your-private-key>
Address = 10.0.0.2/24
[Peer]
PublicKey = <server-public-key>
Endpoint = server.example.com:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
To test outgoing connections, execute:
wrapguard --config=example-wg0.conf -- curl https://example.com
For testing incoming connections, you can run:
wrapguard --config=example-wg0.conf -- python3 -m http.server 8080
WrapGuard offers a straightforward and efficient way to encrypt network traffic across applications, enhancing security without complicated setups.
No comments yet.
Sign in to be the first to comment.