vh (Virtual Host Manager)
A simple, CLI tool for managing local development domains with trusted SSL certificates.
Installation
Ensure you have Rust and Cargo installed, then run:
From crates:
Local:
Quick Start
1. Create a local domain
This creates myapp.test, adds it to /etc/hosts, and generates SSL certificates.
Want a specific IP or TLD?
2. Trust the Local CA Get the green padlock in your browser by trusting the automatically generated Root CA.
(Follow the printed OS-specific instructions to add the CA to your system's trust store).
3. Configure your server Get the exact certificate paths and copy-paste configuration for Nginx, Apache, Node.js, Python, or Go.
Usage
Managing Extensions
By default, vh only allows safe local extensions (like .test, .localhost, .local) to prevent hijacking real internet traffic. If you know what you are doing, you can allow custom extensions:
Shell Completions
Generate autocomplete scripts for your shell:
How it works
- Hosts Routing: Safely edits
/etc/hoststo point your custom domain to localhost (or a specified IP). - Local CA: Automatically generates a dedicated Root Certificate Authority in
~/.local/share/vh/. - SSL Certificates: Issues domain-specific Subject Alternative Name (SAN) certificates signed by the local CA, ensuring modern browsers accept them without warnings once the root is trusted.
Author: Lucian BLETAN
Repository: https://github.com/gni/vh