A VPN written in Rust.
Inspired by https://write.yiransheng.com/vpn
Virtual Network IP: 10.0.0.2
Virtual Network IP: 10.0.0.3
-
Install
just- https://just.systems/man/en/ -
Build the binary and image
just build-image- Start the peers
docker compose up- Exec into the containers from two different terminal sessions
just exec-peer-1 # peer-1
# another session
just exec-peer-2 # peer-2- Use the virtual addresses for communication
Example:
# peer_1
nc -vl 10.0.0.2 12345
# from peer_2
nc -v 10.0.0.2 12345- Stop the containers
docker compose down