本文へスキップ

BoringTun

メンテナンス中
cloudflare/boringtun

Rust で書かれたユーザー空間の WireGuard® 実装。移植性と速度を重視しています。

GitHub で見る
スター
7216
フォーク
533
ウォッチ
7216
未解決の Issue
109

この紹介文は現在英語版のみです。

BoringTun

BoringTun is a high-performance, userspace implementation of the WireGuard® protocol written in Rust. It’s designed for portability and speed, making it an ideal choice for various platforms including iOS, Android, and Linux servers.

Core Features

  • High Performance: Optimized Rust implementation for maximum speed
  • Cross-Platform: Supports multiple architectures and operating systems
  • Security Focused: Implements the WireGuard protocol with security in mind
  • Userspace Implementation: Runs entirely in userspace for better portability
  • Minimal Dependencies: Lightweight and easy to deploy
  • FFI Support: Provides C ABI bindings for integration with other languages
  • JNI Bindings: Java Native Interface support for Android integration

Supported Platforms

Platform Architecture Binary Library
Linux x86_64 ✓ ✓
Linux aarch64 ✓ ✓
Linux armv7 ✓ ✓
macOS x86_64 ✓ ✓
Windows x86_64 ✓ -
iOS aarch64 ✓ -
iOS armv7 ✓ -
Android aarch64 ✓ -
Android arm ✓ -

Quick Start

  1. Installation:

    cargo install boringtun-cli
  2. Building:

    # Library only
    cargo build --lib --no-default-features --release
    
    # Executable
    cargo build --bin boringtun-cli --release
  3. Running:

    # Basic usage
    boringtun-cli [-f/--foreground] INTERFACE-NAME
    
    # With wg-quick
    sudo WG_QUICK_USERSPACE_IMPLEMENTATION=boringtun-cli WG_SUDO=1 wg-quick up CONFIGURATION

Development

  1. Requirements:

    • Rust toolchain
    • sudo (for testing)
    • Docker (for testing)
  2. Testing:

    cargo test
  3. Contributing:

    • Fork the repository
    • Create a feature branch
    • Submit a pull request
    • Follow the contribution guidelines

Integration

  1. C/C++ Integration:

    #include "wireguard_ffi.h"
    // Use the C ABI bindings
  2. Swift Integration:

    // Use bridging header with C bindings
  3. C# Integration:

    [DllImport("boringtun", CallingConvention = CallingConvention.Cdecl)]
    // Use DLLImport

Security Considerations

  • Privilege Dropping: Drops privileges when started
  • CAP_NET_ADMIN: Requires capability for network operations
  • Fwmark Support: Optional fwmark setting with proper privileges
  • Interface Naming: Follows platform-specific conventions

Community

  • Issues: Report bugs and request features on GitHub
  • Contributions: Pull requests are welcome
  • Documentation: Detailed documentation available
  • Support: Community support through GitHub

License

This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.


WireGuard is a registered trademark of Jason A. Donenfeld. BoringTun is not sponsored or endorsed by Jason A. Donenfeld.

共通のカテゴリとタグで順位付けした、似たオープンソースプロジェクトです。

すべてのネットワークプロジェクト →