Skip to content

robin-thoene/wiretui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wiretui

Summary

A minimal keyboard-driven TUI to manage WireGuard VPN connections, heavily inspired by bluetui and impala.

Demo

animation

Prerequisites

You will need to use a Linux based operating system using the NetworkManager.

(Planned) features

  • list all imported connections
  • activate a connection
  • deactivate a connection
  • import a new connection from a config file (#7)
  • remove an existing connection (#6)
  • search connection list (#13)

Installation

Currently the only option to install is building from source, but it is planned to add pre-built binaries that you can download from releases (#3).

git clone https://github.com/robin-thoene/wiretui.git
cd wiretui
cargo install --path ./crates/tui/

Usage

Starting

wiretui

Keybindings

j: move down

k: move up

SPACE: toggle a connection

?: open the help menu

ESC: close a menu

q: quit application

Importing connections

Until this feature is integrated into wiretui, you can import connections from WireGuard config files like so:

# Import from config using the CLI of the NetworkManager
nmcli connection import type wireguard file ./your_wireguard_config_file.conf
# Use this command if you want to disable the autoconnect functionality
nmcli connection modify IMPORTED_CONNECTION_NAME connection.autoconnect no

Local development

CLI

Run the application

cargo run --bin wiretui-bin

Run the tests

cargo test

Check if you violated the hexagonal architecture dependency rules

./scripts/lint_architecture.sh

Check the workspace rules (using cargo-deny)

cargo deny check

Debugging

This project contains a debugger configuration using .vscode files. Those can be used in Neovim as well (see example here).

Logging

This application uses the log crate in combination with the env_logger crate to set the log level. By default the logs are written to a file, which is overridden every time you run the application.

You can see it's current content with

cat ~/.local/state/wiretui/log.txt

To override the log level when running the application use

RUST_LOG=debug cargo run

Valid log level are trace, debug, info, warn and error.

Contributing

As of now this project is publicly available but not actively asking for or accepting pull requests until I finished my desired MVP state. This is due to the fact that the project is part of a university module as well as a learning opportunity for myself.

For the moment you can contribute best by:

  • submitting bug reports
  • reviewing code to be idiomatic, secure and performant

License

See the LICENSE

About

A minimal keyboard-driven TUI to manage WireGuard VPN connections

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Generated from robin-thoene/hexa-rs