Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jedisct1/dsvpn/llms.txt

Use this file to discover all available pages before exploring further.

DSVPN compiles to a single ~25 KB binary with no external runtime dependencies. All you need is a C compiler and standard POSIX headers — both of which are present on any typical development machine. The build system auto-detects compiler flags such as -march=native and -O3, so a plain make is enough to produce an optimized binary for your platform.
Clone the repository and run make:
git clone https://github.com/jedisct1/dsvpn.git
cd dsvpn
make
This produces a stripped dsvpn binary in the current directory. To install it system-wide, run:
sudo make install
This places the binary at /usr/local/sbin/dsvpn.
Linux kernel 3.17 or newer is required. Earlier kernels lack the TUN interface features that DSVPN depends on.

Raspberry Pi

On Raspberry Pi 3 and 4, pass the OPTFLAGS variable to enable ARM NEON SIMD optimizations, which noticeably improve cryptographic throughput:
env OPTFLAGS=-mfpu=neon make
This is otherwise identical to a standard make build and produces the same single dsvpn binary.

Build with Zig

If you have Zig installed, you can use it as an alternative build system. Zig performs cross-compilation and produces a stripped binary optimized for small size:
zig build -Drelease
The compiled binary is placed at:
zig-out/bin/dsvpn
This path can be used directly in place of ./dsvpn in all commands shown throughout the documentation.

System Installation

The Makefile provides install and uninstall targets for placing DSVPN into the standard system binary path:
# Install to /usr/local/sbin/dsvpn
sudo make install

# Remove the installed binary
sudo make uninstall
The install prefix defaults to /usr/local. Override it with the PREFIX variable if you need a different location:
sudo make install PREFIX=/opt/dsvpn
This installs the binary to /opt/dsvpn/sbin/dsvpn.
Running DSVPN always requires root privileges (or CAP_NET_ADMIN on Linux). It needs them to create a TUN interface and modify the system routing table. Use sudo ./dsvpn or run as root.
Linux kernel 3.17 or later is required for TUN device support. If you are running an older kernel (common on some embedded systems or long-term-support distributions), DSVPN will not be able to create the tunnel interface.

Build docs developers (and LLMs) love