https://github.com/valentin271/wtui
A WireGuard client TUI
https://github.com/valentin271/wtui
ratatui rust tui vpn wireguard
Last synced: 4 months ago
JSON representation
A WireGuard client TUI
- Host: GitHub
- URL: https://github.com/valentin271/wtui
- Owner: Valentin271
- Created: 2024-07-14T15:54:38.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-11-26T19:32:25.000Z (7 months ago)
- Last Synced: 2025-11-29T15:53:38.909Z (7 months ago)
- Topics: ratatui, rust, tui, vpn, wireguard
- Language: Rust
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wtui
A [WireGuard](https://www.wireguard.com/) client interface.
## Features
- List Interfaces/Connections
- See connection status (connected/disconnected, bytes received/sent)
- Actions to connect & disconnect
- List most of configuration (address, MTU, endpoint, allowed IPs, DNS)
- Copy public key
- Search for connection
## TODO
- [ ] Available action help popup
# Usage
To use, simply run `wtui`.
You'll very likely need root permission to (1) read WireGuard configuration files and (2) alter
network interfaces and routes.
See [Installation](#Installation) for simplified root usage.
## Keymap
| Key | Action |
| ----------- | --------------- |
| `j`, `Down` | Down |
| `k`, `Up` | Up |
| `c` | Connect |
| `d` | Disconnect |
| `D` | Disconnect all |
| `y` | Yank public key |
| `/` | Search |
| `?`\* | Help |
\*: Soon, see TODO section
# Installation
1. Download from the [Releases](https://github.com/Valentin271/wtui/releases) page or build from source
2. Make binary executable `chmod +x wtui`
3. Move binary to PATH, e.g. `sudo mv wtui /usr/local/bin`
4. (optional) If `wtui` command is not available, add it to your `PATH`: `echo 'export PATH="$PATH:/usr/local/bin"' >> ~/.bashrc`
At this point, you can already use `wtui`, but you may want to enable root usage without password.
Use `visudo` to create a sudoers file:
`sudo visudo /etc/sudoers.d/wireguard`
Add the following lines, and replace `` by your username.
```
ALL= (root) NOPASSWD: /usr/bin/wg-quick
ALL= (root) NOPASSWD: /usr/local/bin/wtui
```
## Keybind
After this setup, I recommend binding `wtui` to a shortcut.
For example, using i3wm & alacritty terminal.
```
bindsym $mod+grave exec alacritty -e sudo wtui
```
# Limitations/Caveats
- Works only with single peer configurations
- Unit tests require `wg` to be installed