A native Go library for creating and using TUN/TAP network interfaces with a simple and efficient API.
Water is a native Go library for creating and interacting with TUN (network layer) and TAP (data link layer) virtual network interfaces. It enables developers to build custom networking applications like VPNs, packet analyzers, and network testing tools directly in Go without relying on external C dependencies. The library provides a simple API that wraps system calls and integrates with Go's standard I/O interfaces.
Go developers building low-level networking tools, VPN clients, packet sniffers, or network simulation applications that require direct access to virtual network interfaces.
Developers choose Water for its pure Go implementation, cross-platform support (Linux, macOS, Windows), and minimalistic design that avoids unnecessary abstractions while providing full control over buffer management and system integration.
A simple TUN/TAP library written in native Go.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses only syscalls and Go standard types, eliminating external C dependencies and simplifying cross-compilation and deployment.
Exposes io.Reader and io.Writer interfaces, enabling seamless use with Go's io and bufio packages for flexible data handling.
Works on Linux (TUN/TAP), macOS (TUN), and Windows (TAP, experimental), allowing code reuse across major operating systems.
Wraps essential syscalls without bloated abstractions, giving developers full control over buffer management for performance tuning.
Only supports point-to-point TUN devices on macOS, with no native TAP support, hindering data link layer development on Apple platforms.
Windows implementation is labeled as experimental with APIs that might change, making it risky for long-term or production deployments.
Focuses solely on interface I/O; packet parsing and protocol handling require external packages like github.com/songgao/packets, adding complexity.