Skip to main content

A client/server tool to securely auto-register peers to a wireguard VPN

Project description

wg-federation

A WireGuard federation server and client.

Optional dependencies

  • systemd-python: enable logging into systemd journal

Development

Python virtualenv must be installed on your system.

# Setup
python -m venv venv
source ./venv/bin/activate
pip install -e ".[dev]"
pip install -e ".[build]" # optional: if you want to build locally
wg-federation # To run wg-federation

# Deactivate
deactivate

Run Unit Tests

pytest -v --spec
pytest -v --cov # To see coverage

Run Functional Tests

behave tests/features
behave tests/features -w # To see all outputs of all features tagged @wip

Run SAST Tests

bandit -c pyproject.toml -r -q .

Setup IDE and Debugger

To avoid having to install the dependencies on your operating system, setup your IDE to use a python virtual environment “SDK”. E.g. the venv directory you may have created above. Intellij/PyCharm provides this feature. This will allow the IDE to find the libraries in the virtual environment, run and debug the application.

To debug the application, run src/wg_federation/__init__.py

Deploy Manually

Build

python -m build

Publish to Test PyPI

Use __token__ as a username to publish using a token

twine upload --repository testpypi dist/*

Publish in Production (PyPI)

Use __token__ as a username to publish using a token

twine upload dist/*VERSION_HERE

Generate the Documentation

sphinx-apidoc -o doc/ src/wg_federation # Generate API documentation directly from the code
pyreverse -o png -d doc/img --colorized --ignore container.py,federation.py,wireguard_interface.py,hq_state.py,controller_events.py,hq_event.py,wireguard_peer.py,constants.py,main.py,status.py,raw_options.py,log_level.py,is_argument_data_class.py,is_data_class.py,interface_status.py,configuration_saver_interface.py,configuration_loader_interface.py,can_save_configuration_interface.py,can_load_configuration_interface.py,user_input.py,command_line_argument.py,configuration_backend.py,argparse_action.py,command_line_option.py src/wg_federation # Generate UML diagram
make -C doc html # Generate HTML documentation from .rst source code

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wg-federation-0.8.0.tar.gz (53.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wg_federation-0.8.0-py3-none-any.whl (84.7 kB view details)

Uploaded Python 3

File details

Details for the file wg-federation-0.8.0.tar.gz.

File metadata

  • Download URL: wg-federation-0.8.0.tar.gz
  • Upload date:
  • Size: 53.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for wg-federation-0.8.0.tar.gz
Algorithm Hash digest
SHA256 34f7e9f49833b99786af4004e4670755e33f2d12788a4975ca6ca1c05441e3a5
MD5 df186127ee97be1f81c791fe8836fce4
BLAKE2b-256 2bd8cdf287e4b7ac27cafc2ad0ebe542aef42a07605c0f0a57533e20db0cc2ae

See more details on using hashes here.

File details

Details for the file wg_federation-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: wg_federation-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 84.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for wg_federation-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c45c172ec8c368b3c967882a58877518337f792243e21e32c2d43abecde83b22
MD5 4c495601709e4084fa47e8a7a49da643
BLAKE2b-256 2eff2b7f7828f41a8f159464f18d20f57a7c6ed804236268e4f2e72095082091

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page