Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. boringtun

boringtun

BSD-3-ClauseRustboringtun-cli-0.5.2

A high-performance, portable userspace WireGuard® VPN implementation written in Rust.

GitHubGitHub
7.2k stars535 forks0 contributors

What is boringtun?

BoringTun is a userspace implementation of the WireGuard® VPN protocol, written in Rust for portability and speed. It provides both a standalone CLI tool for Linux and macOS and a library for building WireGuard clients on platforms like iOS and Android, enabling secure, modern VPN connections without relying on platform-specific network stacks.

Target Audience

Developers building VPN clients for mobile platforms (iOS, Android) or needing a portable, high-performance WireGuard implementation for server environments. It's also suitable for system administrators or DevOps engineers who require a userspace WireGuard tunnel on Linux or macOS that integrates with standard tools like wg and wg-quick.

Value Proposition

Developers choose BoringTun for its cross-platform library that separates WireGuard protocol logic from network stacks, allowing flexible integration, and its high-performance Rust implementation that is deployed at scale on millions of devices and Cloudflare servers. It offers security features like privilege dropping on Linux and compatibility with existing WireGuard tooling.

Overview

Userspace WireGuard® Implementation in Rust

Use Cases

Best For

  • Building WireGuard VPN client applications for iOS and Android using a portable Rust library.
  • Implementing a userspace WireGuard tunnel on Linux or macOS via a standalone CLI tool (boringtun-cli).
  • Integrating WireGuard protocol functionality into C/C++, Swift, Java, or C# projects via FFI or JNI bindings.
  • Deploying high-performance WireGuard connections on server environments, such as Cloudflare's infrastructure.
  • Creating secure VPN solutions for consumer devices that require cross-platform support and efficiency.
  • Using WireGuard with wg-quick on Linux while maintaining security through privilege dropping or custom fwmark settings.

Not Ideal For

  • Systems requiring kernel-level WireGuard integration for maximum network throughput and native OS support
  • Teams seeking a turnkey VPN solution with graphical configuration interfaces or extensive end-user documentation
  • Projects that must use Windows as the primary platform for the standalone CLI tool
  • Environments where Rust toolchain adoption or maintenance is impractical due to infrastructure constraints

Pros & Cons

Pros

High Performance Rust Core

Built in Rust for efficiency and speed, proven at scale on millions of consumer devices and Cloudflare servers, ensuring reliable performance in both mobile and server environments.

Cross-Platform Library

Provides a portable Rust library for implementing WireGuard clients on iOS, Android, and other platforms without relying on platform-specific network stacks, enabling flexible app development.

Security with Privilege Dropping

On Linux, automatically drops privileges after tunnel creation to reduce attack surface, with options to retain them via --disable-drop-privileges or WG_SUDO=1 for advanced use cases like fwmark.

Standard Tool Compatibility

Works seamlessly with existing WireGuard tools like wg and wg-quick, as noted in the README for configuration and integration, minimizing learning curves for administrators.

Flexible Integration Bindings

Exposes C ABI and JNI bindings for integration with C/C++, Swift, Java, and C# projects, facilitating use in diverse codebases without reimplementing protocol logic.

Cons

Development Instability Warning

The README explicitly warns that the master branch is undergoing restructuring and is not stable for reliance, forcing users to depend on crates.io releases for production use.

Linux Privilege Limitations

Privilege dropping can interfere with fwmark settings required by wg-quick, necessitating workarounds like --disable-drop-privileges or WG_SUDO=1, which complicate security and setup.

No Windows CLI Support

While the library supports Windows, the boringtun-cli executable is only available for Linux and macOS, limiting standalone userspace tunnel usage on Windows systems.

Complex Testing Requirements

Testing requires sudo and Docker, as stated in the README, adding overhead for development and CI pipelines compared to simpler, pure-Rust test setups.

Frequently Asked Questions

Quick Stats

Stars7,228
Forks535
Contributors0
Open Issues81
Last commit3 months ago
CreatedSince 2018

Tags

#cli-tool#privacy#tunnel#cloudflare#encryption#wireguard#network-security#cross-platform#vpn#rust

Built With

C
Cargo
R
Rust

Included in

Rust56.6k
Auto-fetched 1 day ago

Related Projects

clash-verge-revclash-verge-rev

A modern GUI client based on Tauri, designed to run in Windows, macOS and Linux for tailored proxy experience

Stars153,036
Forks10,985
Last commit1 day ago
denodeno

A modern runtime for JavaScript and TypeScript.

Stars108,721
Forks6,458
Last commit1 day ago
AlacrittyAlacritty

A cross-platform, OpenGL terminal emulator.

Stars66,015
Forks3,661
Last commit7 days ago
MagiskMagisk

The Magic Mask for Android

Stars63,413
Forks18,985
Last commit6 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub