DefGuard/wireguard-rs
소개
Rust library providing unified WireGuard interface to native/kernel and userspace implementations
시스템 및 인프라What you can do
- Peer routing - see WGApi docs.
- On FreeBSD network interfaces are managed using ioctl.
- On Linux, handle network routing using netlink.
- fwmark handling
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
defguard_wireguard_rs is a multi-platform Rust library providing a unified high-level API for managing WireGuard interfaces using native OS kernel and userspace WireGuard protocol implementations. It can be used to create your own WireGuard:tm: VPN servers or clients for secure and private networking.
It was developed as part of defguard security platform and used in the gateway/server as well as desktop client.
Supported platforms
- Native OS Kernel: Linux, FreeBSD (and pfSense/OPNSense), NetBSD, Windows
- Userspace: Linux, macOS, FreeBSD, NetBSD
Unique features
- Peer routing - see WGApi docs.
- Configuring DNS resolver - see WGApi docs.
- On FreeBSD network interfaces are managed using ioctl.
- On Linux, handle network routing using netlink.
- fwmark handling
Windows support
Please note that WireGuard-NT dll file has to be placed under resources-windows/binaries/wireguard.dll path relative to your binary.
Windows development
For Windows development you'll need:
- The
stable-x86_64-pc-windows-gnuRust toolchain. Userustupto change the toolchain:
rustup install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu
Install MSYS2
Then run this in the MSYS2 terminal:
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-nasm
- Finally add msys to your PATH:
# cmd
set PATH=C:\msys64\ucrt64\bin;%PATH%
# power-shell
$env:PATH = "C:\msys64\ucrt64\bin;" + $env:PATH
More info can be found here.
Examples
- Client: https://github.com/DefGuard/wireguard-rs/blob/main/examples/client.rs
- Server: https://github.com/DefGuard/wireguard-rs/blob/main/examples/server.rs
Documentation
See the documentation for more information.
Community and Support
Reach out to our community via GitHub Discussions
Contribution
Please review the Contributing guide for information on how to get started contributing to the project. You might also find our environment setup guide handy.
Legal
WireGuard® is registered trademarks of Jason A. Donenfeld.
관련 프로젝트 살펴보기
불러오는 중…