Skip to main content

Synchronizes your WireGuard settings with Pro Custodibus.

Project description

Pro Custodibus Agent

Pro Custodibus is a service that makes WireGuard networks easy to deploy and manage. You run the Pro Custodibus agent on each WireGuard host you want to manage, and the agent monitors and synchronizes the hosts' WireGuard settings with the remote Pro Custodibus service.

Installing

Requires python 3.8 or newer and libsodium. Installer script can install requirements, plus the agent itself, on most linuxes, FreeBSD, OpenBSD, and macOS (if macOS has Homebrew). Install from source like the following:

./install.sh --install

Or run it like the following to see more options:

./install.sh --help

See the Installer Documentation for full details (or to download the pre-built Windows installer).

Docker

The docker/wireguard.dockerfile is built weekly and pushed to the docker.io/procustodibus/wireguard repository. It produces a base WireGuard image without the agent.

The docker/agent.dockerfile is built weekly and pushed to the docker.io/procustodibus/agent repository. It produces a Docker image with WireGuard and the latest agent installed together.

Run either image by placing your WireGuard or Pro Custodibus configuration files in a host directory like /srv/containers/wireguard/conf, and then running the image like the following:

docker run \
    --cap-add NET_ADMIN \
    --publish 51820:51820/udp \
    --name wireguard \
    --rm \
    --volume /srv/containers/wireguard/conf:/etc/wireguard \
    procustodibus/agent

See the Container Documentation for full details.

Development

Set up dev env

  1. Create a virtualenv with pyenv:

    pyenv virtualenv 3.10.4 procustodibus-agent
    
  2. Activate the virtualenv:

    pyenv local procustodibus-agent 3.8.19 3.9.19 3.10.14 3.11.9 3.12.4
    
  3. Install tox:

    pip install tox
    
  4. Install pre-commit and pre-push hooks:

    tox -e pre-commit -- install
    tox -e pre-commit -- install -t pre-push
    

Dev tasks

List all tox tasks you can run:

tox -av

Run unit tests in watch mode:

tox -e watch

Build and run docker dev image (with *.conf files in /srv/containers/wireguard/conf):

tox -e build
docker/dev.sh dev
docker run \
    --cap-add NET_ADMIN \
    --publish 51820:51820/udp \
    --name wireguard \
    --rm \
    --volume /srv/containers/wireguard/conf:/etc/wireguard \
    procustodibus-agent:dev

Run all (docker-based) installer tests:

docker-compose -f test_install/docker-compose.yml build --pull
tox -e py310 -- test_install

Manually run pre-push hook on all version-controlled files:

tox -e pre-commit -- run -a --hook-stage push

Build Windows installer

  1. Install Python.

  2. Install Inno Setup.

  3. Create a virtualenv:

    python -m venv C:\venvs\procustodibus-agent
    
  4. Activate the virtualenv:

    C:\venvs\procustodibus-agent\Scripts\activate.bat
    
  5. Install tox:

    pip install tox
    
  6. Build the Windows executables with cx_freeze:

    tox -e build_exe
    
  7. Build the Windows installer with Inno Setup:

    "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\windows.iss
    

The installer will be built as dist\ProCustodibusAgentInstaller.exe.

Contributing

Resources

License

The MIT License

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

procustodibus_agent-1.7.1.tar.gz (52.2 kB view details)

Uploaded Source

Built Distribution

procustodibus_agent-1.7.1-py3-none-any.whl (57.7 kB view details)

Uploaded Python 3

File details

Details for the file procustodibus_agent-1.7.1.tar.gz.

File metadata

  • Download URL: procustodibus_agent-1.7.1.tar.gz
  • Upload date:
  • Size: 52.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for procustodibus_agent-1.7.1.tar.gz
Algorithm Hash digest
SHA256 4b55fbbb7521ac98321414abb68a9c465cf5714adc96efe1fb4e3350d8e5532f
MD5 5bda2dc298dbc91e2969ad2622042f35
BLAKE2b-256 7d49c5f80309ebf3b1703a254dbbdc27c7cf931a449dfd2b7d3275ddb2ad8d17

See more details on using hashes here.

File details

Details for the file procustodibus_agent-1.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for procustodibus_agent-1.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbd715e689fc7f1fb39502fdfd3f16daffc4c4f88a28891c3482814d535eebb4
MD5 12e4d2c55990aafd0c1211acd60ff63e
BLAKE2b-256 f43cc2787d4dbc6512da0fa6e939c8b3d5089e532457412d1f90ffc633bb8f80

See more details on using hashes here.

Supported by

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