Metadata-Version: 2.4
Name: procustodibus_agent
Version: 1.10.2
Summary: Synchronizes your WireGuard settings with Pro Custodibus.
Project-URL: Homepage, https://www.procustodibus.com/
Project-URL: Changelog, https://docs.procustodibus.com/guide/agents/download/#changelog
Project-URL: Documentation, https://docs.procustodibus.com/guide/agents/run/
Project-URL: Source, https://git.sr.ht/~arx10/procustodibus-agent
Project-URL: Tracker, https://todo.sr.ht/~arx10/procustodibus-agent
Author-email: Arcem Tene <dev@arcemtene.com>
License: The MIT License
        
        Copyright (c) 2019-2025 Arcem Tene
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Networking :: Monitoring
Requires-Python: >=3.6.2
Requires-Dist: dnspython~=2.2
Requires-Dist: docopt-ng~=0.7
Requires-Dist: importlib-metadata>=4.8.3
Requires-Dist: inflection~=0.5
Requires-Dist: pynacl~=1.5
Requires-Dist: pywin32~=306.0; sys_platform == 'win32'
Requires-Dist: requests~=2.27
Requires-Dist: tabulate~=0.8
Description-Content-Type: text/markdown

Pro Custodibus Agent
====================

[Pro Custodibus](https://www.procustodibus.com/) is a service that makes [WireGuard](https://www.wireguard.com/) 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](https://brew.sh/)). 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](https://docs.procustodibus.com/guide/agents/install/) for full details (or to download the pre-built Windows installer).


Docker
------

The [docker/wireguard.dockerfile](https://git.sr.ht/~arx10/procustodibus-agent/tree/main/item/docker/wireguard.dockerfile) is built weekly and pushed to the [docker.io/procustodibus/wireguard](https://hub.docker.com/r/procustodibus/wireguard) repository. It produces a base WireGuard image without the agent.

The [docker/agent.dockerfile](https://git.sr.ht/~arx10/procustodibus-agent/tree/main/item/docker/agent.dockerfile) is built weekly and pushed to the [docker.io/procustodibus/agent](https://hub.docker.com/r/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](https://docs.procustodibus.com/guide/agents/container/) for full details.


Development
-----------

### Set up dev env

Install [uv](https://docs.astral.sh/uv/), and from this project root run:
```
uv python install
uv sync
```

### Dev tasks

Run unit tests:
```
uv run pytest
```

Run unit tests in watch mode:
```
uv run ptw .
```

Run unit tests with coverage report:
```
uv run pytest --cov
```

Run linter and auto-fix where possible:
```
uv run ruff check --fix
```

Run formatter:
```
uv run ruff format
```

Build and run docker dev image (with `*.conf` files in `/srv/containers/wireguard/conf`):
```
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
uv run pytest test_install
```

### Build Windows MSI

Install [uv](https://docs.astral.sh/uv/), and from this project root run:
```
uv run --python 3.12 --group freeze cx_freeze_setup.py bdist_msi
```


Contributing
------------

* [Code of Conduct](https://docs.procustodibus.com/community/conduct/)
* [File a Bug](https://docs.procustodibus.com/guide/community/bugs/)
* [Report a Vulnerability](https://docs.procustodibus.com/guide/community/vulns/)
* [Submit a Patch](https://docs.procustodibus.com/guide/community/code/)


Resources
---------

* Home page: https://www.procustodibus.com/
* Documentation: https://docs.procustodibus.com/guide/agents/run/
* Changelog: https://docs.procustodibus.com/guide/agents/download/#changelog
* Issue tracker: https://todo.sr.ht/~arx10/procustodibus
* Mailing list: https://lists.sr.ht/~arx10/procustodibus
* Source code: https://git.sr.ht/~arx10/procustodibus-agent


License
-------

[The MIT License](https://git.sr.ht/~arx10/procustodibus-agent/tree/main/LICENSE)
