[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5589":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":29,"discoverSource":30},5589,"boringtun","cloudflare\u002Fboringtun","cloudflare","Userspace WireGuard® Implementation in Rust","",null,"Rust",7076,512,73,74,0,2,34,68.53,"BSD 3-Clause \"New\" or \"Revised\" License",false,"master",[7,24,25],"rust","wireguard","2026-06-12 04:00:25","![boringtun logo banner](.\u002Fbanner.png)\n\n# BoringTun\n\n## Warning\nBoringtun is currently undergoing a restructuring. You should probably not rely on or link to \nthe master branch right now. Instead you should use the crates.io page.\n\n- boringtun: [![crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fboringtun.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fboringtun)\n- boringtun-cli [![crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fboringtun-cli.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fboringtun-cli)\n\n**BoringTun** is an implementation of the [WireGuard\u003Csup>®\u003C\u002Fsup>](https:\u002F\u002Fwww.wireguard.com\u002F) protocol designed for portability and speed.\n\n**BoringTun** is successfully deployed on millions of [iOS](https:\u002F\u002Fapps.apple.com\u002Fus\u002Fapp\u002F1-1-1-1-faster-internet\u002Fid1423538627) and [Android](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.cloudflare.onedotonedotonedotone&hl=en_US) consumer devices as well as thousands of Cloudflare Linux servers. \n\nThe project consists of two parts:\n\n* The executable `boringtun-cli`, a [userspace WireGuard](https:\u002F\u002Fwww.wireguard.com\u002Fxplatform\u002F) \n  implementation for Linux and macOS.\n* The library `boringtun` that can be used to implement fast and efficient WireGuard client apps on various platforms, including iOS and Android. It implements the underlying WireGuard protocol, without the network or tunnel stacks, those can be implemented in a platform idiomatic way.\n\n### Installation\n\nYou can install this project using `cargo`:\n\n```\ncargo install boringtun-cli\n```\n\n### Building\n\n- Library only: `cargo build --lib --no-default-features --release [--target $(TARGET_TRIPLE)]`\n- Executable: `cargo build --bin boringtun-cli --release [--target $(TARGET_TRIPLE)]`\n\nBy default the executable is placed in the `.\u002Ftarget\u002Frelease` folder. You can copy it to a desired location manually, or install it using `cargo install --bin boringtun --path .`.\n\n### Running\n\nAs per the specification, to start a tunnel use:\n\n`boringtun-cli [-f\u002F--foreground] INTERFACE-NAME`\n\nThe tunnel can then be configured using [wg](https:\u002F\u002Fgit.zx2c4.com\u002FWireGuard\u002Fabout\u002Fsrc\u002Ftools\u002Fman\u002Fwg.8), as a regular WireGuard tunnel, or any other tool.\n\nIt is also possible to use with [wg-quick](https:\u002F\u002Fgit.zx2c4.com\u002FWireGuard\u002Fabout\u002Fsrc\u002Ftools\u002Fman\u002Fwg-quick.8) by setting the environment variable `WG_QUICK_USERSPACE_IMPLEMENTATION` to `boringtun`. For example:\n\n`sudo WG_QUICK_USERSPACE_IMPLEMENTATION=boringtun-cli WG_SUDO=1 wg-quick up CONFIGURATION`\n\n### Testing\n\nTesting this project has a few requirements:\n\n- `sudo`: required to create tunnels. When you run `cargo test` you'll be prompted for your password.\n- Docker: you can install it [here](https:\u002F\u002Fwww.docker.com\u002Fget-started). If you are on Ubuntu\u002FDebian you can run `apt-get install docker.io`.\n\n## Supported platforms\n\nTarget triple                 |Binary|Library|\n------------------------------|:----:|------|\nx86_64-unknown-linux-gnu      |  ✓   | ✓    |\naarch64-unknown-linux-gnu     |  ✓   | ✓    |\narmv7-unknown-linux-gnueabihf |  ✓   | ✓    |\nx86_64-apple-darwin           |  ✓   | ✓    |\nx86_64-pc-windows-msvc        |      | ✓    |\naarch64-apple-ios             |      | ✓    |\narmv7-apple-ios               |      | ✓    |\narmv7s-apple-ios              |      | ✓    |\naarch64-linux-android         |      | ✓    |\narm-linux-androideabi         |      | ✓    |\n\n\u003Csub>Other platforms may be added in the future\u003C\u002Fsub>\n\n#### Linux\n\n`x86-64`, `aarch64` and `armv7` architectures are supported. The behaviour should be identical to that of [wireguard-go](https:\u002F\u002Fgit.zx2c4.com\u002Fwireguard-go\u002Fabout\u002F), with the following difference:\n\n`boringtun` will drop privileges when started. When privileges are dropped it is not possible to set `fwmark`. If `fwmark` is required, such as when using `wg-quick`, run with `--disable-drop-privileges` or set the environment variable `WG_SUDO=1`.\n\nYou will need to give the executable the `CAP_NET_ADMIN` capability using: `sudo setcap cap_net_admin+epi boringtun`. sudo is not needed.\n\n#### macOS\n\nThe behaviour is similar to that of [wireguard-go](https:\u002F\u002Fgit.zx2c4.com\u002Fwireguard-go\u002Fabout\u002F). Specifically the interface name must be `utun[0-9]+` for an explicit interface name or `utun` to have the kernel select the lowest available. If you choose `utun` as the interface name, and the environment variable `WG_TUN_NAME_FILE` is defined, then the actual name of the interface chosen by the kernel is written to the file specified by that variable.\n\n---\n\n#### FFI bindings\n\nThe library exposes a set of C ABI bindings, those are defined in the `wireguard_ffi.h` header file. The C bindings can be used with C\u002FC++, Swift (using a bridging header) or C# (using [DLLImport](https:\u002F\u002Fdocs.microsoft.com\u002Fen-us\u002Fdotnet\u002Fapi\u002Fsystem.runtime.interopservices.dllimportattribute?view=netcore-2.2) with [CallingConvention](https:\u002F\u002Fdocs.microsoft.com\u002Fen-us\u002Fdotnet\u002Fapi\u002Fsystem.runtime.interopservices.dllimportattribute.callingconvention?view=netcore-2.2) set to `Cdecl`).\n\n#### JNI bindings\n\nThe library exposes a set of Java Native Interface bindings, those are defined in `src\u002Fjni.rs`.\n\n## License\n\nThe project is licensed under the [3-Clause BSD License](https:\u002F\u002Fopensource.org\u002Flicenses\u002FBSD-3-Clause).\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the 3-Clause BSD License, shall be licensed as above, without any additional terms or conditions.\n\nIf you want to contribute to this project, please read our [`CONTRIBUTING.md`].\n\n[`CONTRIBUTING.md`]: https:\u002F\u002Fgithub.com\u002Fcloudflare\u002F.github\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md\n\n---\n\u003Csub>\u003Csub>\u003Csub>\u003Csub>WireGuard is a registered trademark of Jason A. Donenfeld. BoringTun is not sponsored or endorsed by Jason A. Donenfeld.\u003C\u002Fsub>\u003C\u002Fsub>\u003C\u002Fsub>\u003C\u002Fsub>\n","BoringTun 是一个用 Rust 语言编写的 WireGuard 协议的用户空间实现，旨在提高可移植性和速度。其核心功能包括一个可在 Linux 和 macOS 上运行的命令行工具 boringtun-cli，以及一个可以被多种平台（如 iOS 和 Android）集成的库 boringtun，用于开发快速高效的 WireGuard 客户端应用。该项目支持在没有网络或隧道堆栈的情况下实现底层 WireGuard 协议，并允许开发者以平台特有的方式实现这些组件。BoringTun 适用于需要高性能、跨平台虚拟私有网络解决方案的场景，比如移动设备上的安全通信或是大规模服务器部署中的加密连接。","2026-06-11 03:04:13","top_language"]