Add usage examples
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user