From 50a298da2092eaa170ab3ef7539805697340981e Mon Sep 17 00:00:00 2001 From: Fedor Lyanguzov Date: Sat, 3 Jan 2026 13:06:33 +0300 Subject: [PATCH] Add usage examples --- README.md | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ce4c4d6..13d9aa5 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,43 @@ -# vpn-manager +# WireGuard config manager (WCM) Manage WireGuard VPN peers (both server and clients) +## Usage + +```bash +# networks +wcm network add test +wcm network add with-ip --address=10.0.0.2/24 +wcm network delete with-ip +wcm network add no-preshared --no-preshared-key +wcm network show + +# peers +wcm peer add temp +wcm peer add server to network test --pass-thru=0.0.0.0/0 --port=59 +wcm peer add alice to network test --address=10.0.0.150 +wcm peer add bob to network test --with-pk=wireguardprivatekey= +wcm peer remove alice from network test +wcm peer delete alice +wcm peer show + +# config +wcm config make test +wcm config make all +wcm config make test --output-dir=~/vpn-configs +wcm config load ~/vpn-configs/old + +# Delete database +wcm database delete + +# development crud +``` + ## Development To start developing: -``` +```bash python -m venv .venv source .venv/Scripts/activate pip install -e .[test,lint] @@ -16,17 +47,17 @@ deactivate Tools: -``` +```bash pytest -flake8 vpn_manager -black vpn_manager +flake8 wcm +black wcm ``` Test runs: -``` +```bash # package -$ python -m vpn_manager +$ python -m wcm run # script declared in pyproject.toml $ example