procustodibus_agent 1.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- procustodibus_agent-1.8.0/.build.yml +45 -0
- procustodibus_agent-1.8.0/.dockerignore +8 -0
- procustodibus_agent-1.8.0/.editorconfig +26 -0
- procustodibus_agent-1.8.0/.gitignore +18 -0
- procustodibus_agent-1.8.0/.python-version +7 -0
- procustodibus_agent-1.8.0/LICENSE +21 -0
- procustodibus_agent-1.8.0/PKG-INFO +203 -0
- procustodibus_agent-1.8.0/README.md +151 -0
- procustodibus_agent-1.8.0/coveragerc +7 -0
- procustodibus_agent-1.8.0/cx_freeze_setup.py +284 -0
- procustodibus_agent-1.8.0/docker/agent-fs/etc/init.d/procustodibus-agent +15 -0
- procustodibus_agent-1.8.0/docker/agent.dockerfile +43 -0
- procustodibus_agent-1.8.0/docker/agent.sh +42 -0
- procustodibus_agent-1.8.0/docker/dev-fs/etc/init.d/dev-custom-cacerts +18 -0
- procustodibus_agent-1.8.0/docker/dev-fs/etc/init.d/dev-custom-hosts +17 -0
- procustodibus_agent-1.8.0/docker/dev-fs/etc/init.d/dev-down-up +14 -0
- procustodibus_agent-1.8.0/docker/dev-fs/etc/init.d/dev-receive-traffic +14 -0
- procustodibus_agent-1.8.0/docker/dev-fs/etc/init.d/dev-send-traffic +14 -0
- procustodibus_agent-1.8.0/docker/dev-fs/usr/local/bin/dev-down-up.sh +75 -0
- procustodibus_agent-1.8.0/docker/dev-fs/usr/local/bin/dev-send-traffic.sh +68 -0
- procustodibus_agent-1.8.0/docker/dev.dockerfile +43 -0
- procustodibus_agent-1.8.0/docker/dev.sh +17 -0
- procustodibus_agent-1.8.0/docker/wireguard-fs/etc/init.d/wg-quick +26 -0
- procustodibus_agent-1.8.0/docker/wireguard.dockerfile +44 -0
- procustodibus_agent-1.8.0/docker/wireguard.sh +34 -0
- procustodibus_agent-1.8.0/etc/freebsd.service +18 -0
- procustodibus_agent-1.8.0/etc/launchd.plist +30 -0
- procustodibus_agent-1.8.0/etc/openrc.service +14 -0
- procustodibus_agent-1.8.0/etc/systemd.service +101 -0
- procustodibus_agent-1.8.0/etc/sysvinit.sh +64 -0
- procustodibus_agent-1.8.0/install.sh +1836 -0
- procustodibus_agent-1.8.0/installer/cnf.txt +7 -0
- procustodibus_agent-1.8.0/installer/favicon.ico +0 -0
- procustodibus_agent-1.8.0/installer/help.url +2 -0
- procustodibus_agent-1.8.0/installer/log.txt +3 -0
- procustodibus_agent-1.8.0/installer/troubleshooting.url +2 -0
- procustodibus_agent-1.8.0/installer/windows.iss +117 -0
- procustodibus_agent-1.8.0/procustodibus_agent/__init__.py +11 -0
- procustodibus_agent-1.8.0/procustodibus_agent/agent.py +126 -0
- procustodibus_agent-1.8.0/procustodibus_agent/api.py +489 -0
- procustodibus_agent-1.8.0/procustodibus_agent/cli.py +74 -0
- procustodibus_agent-1.8.0/procustodibus_agent/cnf.py +763 -0
- procustodibus_agent-1.8.0/procustodibus_agent/connectivity.py +201 -0
- procustodibus_agent-1.8.0/procustodibus_agent/credentials.py +57 -0
- procustodibus_agent-1.8.0/procustodibus_agent/executor/__init__.py +3 -0
- procustodibus_agent-1.8.0/procustodibus_agent/executor/execution.py +1105 -0
- procustodibus_agent-1.8.0/procustodibus_agent/executor/sys_cmd.py +701 -0
- procustodibus_agent-1.8.0/procustodibus_agent/extras.py +402 -0
- procustodibus_agent-1.8.0/procustodibus_agent/ip_route.py +413 -0
- procustodibus_agent-1.8.0/procustodibus_agent/mfa/__init__.py +237 -0
- procustodibus_agent-1.8.0/procustodibus_agent/mfa/api.py +77 -0
- procustodibus_agent-1.8.0/procustodibus_agent/mfa/cli.py +126 -0
- procustodibus_agent-1.8.0/procustodibus_agent/resolve_hostname.py +865 -0
- procustodibus_agent-1.8.0/procustodibus_agent/wg.py +296 -0
- procustodibus_agent-1.8.0/procustodibus_agent/wg_cnf.py +744 -0
- procustodibus_agent-1.8.0/procustodibus_agent/windows/__init__.py +1 -0
- procustodibus_agent-1.8.0/procustodibus_agent/windows/cnf.py +222 -0
- procustodibus_agent-1.8.0/procustodibus_agent/windows/service.py +93 -0
- procustodibus_agent-1.8.0/procustodibus_agent/windows/service_config.py +11 -0
- procustodibus_agent-1.8.0/pyproject.toml +94 -0
- procustodibus_agent-1.8.0/scripts/linux/clamp_mss +79 -0
- procustodibus_agent-1.8.0/scripts/linux/forward +119 -0
- procustodibus_agent-1.8.0/scripts/linux/fw_zone +56 -0
- procustodibus_agent-1.8.0/scripts/linux/masquerade +90 -0
- procustodibus_agent-1.8.0/scripts/windows/clamp_mss.ps1 +53 -0
- procustodibus_agent-1.8.0/scripts/windows/forward.ps1 +83 -0
- procustodibus_agent-1.8.0/scripts/windows/fw_zone.ps1 +56 -0
- procustodibus_agent-1.8.0/scripts/windows/masquerade.ps1 +77 -0
- procustodibus_agent-1.8.0/uv.lock +2888 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
image: fedora/latest
|
|
2
|
+
packages:
|
|
3
|
+
- iproute # for tests
|
|
4
|
+
- libnsl # for python 3.7
|
|
5
|
+
- libxcrypt-compat # for python 3.7
|
|
6
|
+
- uv
|
|
7
|
+
sources:
|
|
8
|
+
- https://git.sr.ht/~arx10/procustodibus-agent
|
|
9
|
+
tasks:
|
|
10
|
+
- sync: |
|
|
11
|
+
cd procustodibus-agent
|
|
12
|
+
uv python install
|
|
13
|
+
uv sync
|
|
14
|
+
- lint: |
|
|
15
|
+
cd procustodibus-agent
|
|
16
|
+
uv run ruff check
|
|
17
|
+
uv run ruff format --diff
|
|
18
|
+
- test: |
|
|
19
|
+
cd procustodibus-agent
|
|
20
|
+
uv run pytest --cov --cov-report term-missing
|
|
21
|
+
- test_py37: |
|
|
22
|
+
cd procustodibus-agent
|
|
23
|
+
uv run --python 3.7 pytest
|
|
24
|
+
- test_py38: |
|
|
25
|
+
cd procustodibus-agent
|
|
26
|
+
uv run --python 3.8 pytest
|
|
27
|
+
- test_py39: |
|
|
28
|
+
cd procustodibus-agent
|
|
29
|
+
uv run --python 3.9 pytest
|
|
30
|
+
- test_py310: |
|
|
31
|
+
cd procustodibus-agent
|
|
32
|
+
uv run --python 3.10 pytest
|
|
33
|
+
- test_py311: |
|
|
34
|
+
cd procustodibus-agent
|
|
35
|
+
uv run --python 3.11 pytest
|
|
36
|
+
- test_py312: |
|
|
37
|
+
cd procustodibus-agent
|
|
38
|
+
uv run --python 3.12 pytest
|
|
39
|
+
- test_py313: |
|
|
40
|
+
cd procustodibus-agent
|
|
41
|
+
uv run --python 3.13 pytest
|
|
42
|
+
triggers:
|
|
43
|
+
- action: email
|
|
44
|
+
condition: always
|
|
45
|
+
to: dev@arcemtene.com
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# EditorConfig helps developers define and maintain consistent
|
|
2
|
+
# coding styles between different editors and IDEs
|
|
3
|
+
# http://editorconfig.org
|
|
4
|
+
|
|
5
|
+
root = true
|
|
6
|
+
|
|
7
|
+
[*]
|
|
8
|
+
charset = utf-8
|
|
9
|
+
end_of_line = lf
|
|
10
|
+
indent_size = 2
|
|
11
|
+
indent_style = space
|
|
12
|
+
insert_final_newline = true
|
|
13
|
+
trim_trailing_whitespace = true
|
|
14
|
+
|
|
15
|
+
[*.cfg,toml]
|
|
16
|
+
indent_size = 4
|
|
17
|
+
|
|
18
|
+
[Makefile]
|
|
19
|
+
indent_style = tab
|
|
20
|
+
|
|
21
|
+
[*.py]
|
|
22
|
+
indent_size = 4
|
|
23
|
+
max_line_length = 88
|
|
24
|
+
|
|
25
|
+
[*.rst]
|
|
26
|
+
indent_size = 3
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# setuptools build dir
|
|
2
|
+
/build/
|
|
3
|
+
# tool caches
|
|
4
|
+
.*cache
|
|
5
|
+
# pytest-cov data
|
|
6
|
+
/.coverage
|
|
7
|
+
# setuptools dist dir
|
|
8
|
+
/dist/
|
|
9
|
+
# setuptools build package info
|
|
10
|
+
/*.egg-info/
|
|
11
|
+
# local env settings
|
|
12
|
+
/.env
|
|
13
|
+
# pytest-cov report
|
|
14
|
+
/htmlcov/
|
|
15
|
+
# compiled python
|
|
16
|
+
*.pyc
|
|
17
|
+
# uv virtualenvs
|
|
18
|
+
/.venv/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019-2025 Arcem Tene
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: procustodibus_agent
|
|
3
|
+
Version: 1.8.0
|
|
4
|
+
Summary: Synchronizes your WireGuard settings with Pro Custodibus.
|
|
5
|
+
Project-URL: Homepage, https://www.procustodibus.com/
|
|
6
|
+
Project-URL: Changelog, https://docs.procustodibus.com/guide/agents/download/#changelog
|
|
7
|
+
Project-URL: Documentation, https://docs.procustodibus.com/guide/agents/run/
|
|
8
|
+
Project-URL: Source, https://git.sr.ht/~arx10/procustodibus-agent
|
|
9
|
+
Project-URL: Tracker, https://todo.sr.ht/~arx10/procustodibus-agent
|
|
10
|
+
Author-email: Arcem Tene <dev@arcemtene.com>
|
|
11
|
+
License: The MIT License
|
|
12
|
+
|
|
13
|
+
Copyright (c) 2019-2025 Arcem Tene
|
|
14
|
+
|
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
in the Software without restriction, including without limitation the rights
|
|
18
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
furnished to do so, subject to the following conditions:
|
|
21
|
+
|
|
22
|
+
The above copyright notice and this permission notice shall be included in
|
|
23
|
+
all copies or substantial portions of the Software.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
31
|
+
THE SOFTWARE.
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
34
|
+
Classifier: Intended Audience :: System Administrators
|
|
35
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
42
|
+
Classifier: Topic :: System :: Networking :: Monitoring
|
|
43
|
+
Requires-Python: >=3.6.2
|
|
44
|
+
Requires-Dist: dnspython~=2.2
|
|
45
|
+
Requires-Dist: docopt-ng~=0.7
|
|
46
|
+
Requires-Dist: inflection~=0.5
|
|
47
|
+
Requires-Dist: pynacl~=1.5
|
|
48
|
+
Requires-Dist: pywin32~=306.0; sys_platform == 'win32'
|
|
49
|
+
Requires-Dist: requests~=2.27
|
|
50
|
+
Requires-Dist: tabulate~=0.8
|
|
51
|
+
Description-Content-Type: text/markdown
|
|
52
|
+
|
|
53
|
+
Pro Custodibus Agent
|
|
54
|
+
====================
|
|
55
|
+
|
|
56
|
+
[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.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Installing
|
|
60
|
+
----------
|
|
61
|
+
|
|
62
|
+
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:
|
|
63
|
+
```
|
|
64
|
+
./install.sh --install
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or run it like the following to see more options:
|
|
68
|
+
```
|
|
69
|
+
./install.sh --help
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
See the [Installer Documentation](https://docs.procustodibus.com/guide/agents/install/) for full details (or to download the pre-built Windows installer).
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
Docker
|
|
76
|
+
------
|
|
77
|
+
|
|
78
|
+
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.
|
|
79
|
+
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
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:
|
|
83
|
+
```
|
|
84
|
+
docker run \
|
|
85
|
+
--cap-add NET_ADMIN \
|
|
86
|
+
--publish 51820:51820/udp \
|
|
87
|
+
--name wireguard \
|
|
88
|
+
--rm \
|
|
89
|
+
--volume /srv/containers/wireguard/conf:/etc/wireguard \
|
|
90
|
+
procustodibus/agent
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
See the [Container Documentation](https://docs.procustodibus.com/guide/agents/container/) for full details.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
Development
|
|
97
|
+
-----------
|
|
98
|
+
|
|
99
|
+
### Set up dev env
|
|
100
|
+
|
|
101
|
+
Install [uv](https://docs.astral.sh/uv/), and from this project root run:
|
|
102
|
+
```
|
|
103
|
+
uv python install
|
|
104
|
+
uv sync
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Dev tasks
|
|
108
|
+
|
|
109
|
+
Run unit tests:
|
|
110
|
+
```
|
|
111
|
+
uv run pytest
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Run unit tests in watch mode:
|
|
115
|
+
```
|
|
116
|
+
uv run ptw .
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Run unit tests with coverage report:
|
|
120
|
+
```
|
|
121
|
+
uv run pytest --cov --cov-report term-missing
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Run linter and auto-fix where possible:
|
|
125
|
+
```
|
|
126
|
+
uv run ruff check --fix
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Run formatter:
|
|
130
|
+
```
|
|
131
|
+
uv run ruff format
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Build and run docker dev image (with `*.conf` files in `/srv/containers/wireguard/conf`):
|
|
135
|
+
```
|
|
136
|
+
docker/dev.sh dev
|
|
137
|
+
docker run \
|
|
138
|
+
--cap-add NET_ADMIN \
|
|
139
|
+
--publish 51820:51820/udp \
|
|
140
|
+
--name wireguard \
|
|
141
|
+
--rm \
|
|
142
|
+
--volume /srv/containers/wireguard/conf:/etc/wireguard \
|
|
143
|
+
procustodibus-agent:dev
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Run all (docker-based) installer tests:
|
|
147
|
+
```
|
|
148
|
+
docker compose -f test_install/docker-compose.yml build --pull
|
|
149
|
+
uv run pytest test_install
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Build Windows MSI
|
|
153
|
+
|
|
154
|
+
Install [uv](https://docs.astral.sh/uv/), and from this project root run:
|
|
155
|
+
```
|
|
156
|
+
uv run --python 3.12 --group freeze cx_freeze_setup.py bdist_msi
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The MSI package will be built as `dist\procustodibus_agent-x.x.x-win64.msi`.
|
|
160
|
+
|
|
161
|
+
### Build Windows installer exe
|
|
162
|
+
|
|
163
|
+
1. Install [uv](https://docs.astral.sh/uv/).
|
|
164
|
+
|
|
165
|
+
2. Install [Inno Setup](https://jrsoftware.org/isdl.php).
|
|
166
|
+
|
|
167
|
+
3. Build the Windows executables with cx_freeze:
|
|
168
|
+
```
|
|
169
|
+
uv run --python 3.12 --group freeze cx_freeze_setup.py build_exe
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
4. Build the Windows installer with Inno Setup:
|
|
173
|
+
```
|
|
174
|
+
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\windows.iss
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The installer will be built as `dist\ProCustodibusAgentInstaller.exe`.
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
Contributing
|
|
181
|
+
------------
|
|
182
|
+
|
|
183
|
+
* [Code of Conduct](https://docs.procustodibus.com/community/conduct/)
|
|
184
|
+
* [File a Bug](https://docs.procustodibus.com/guide/community/bugs/)
|
|
185
|
+
* [Report a Vulnerability](https://docs.procustodibus.com/guide/community/vulns/)
|
|
186
|
+
* [Submit a Patch](https://docs.procustodibus.com/guide/community/code/)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
Resources
|
|
190
|
+
---------
|
|
191
|
+
|
|
192
|
+
* Home page: https://www.procustodibus.com/
|
|
193
|
+
* Documentation: https://docs.procustodibus.com/guide/agents/run/
|
|
194
|
+
* Changelog: https://docs.procustodibus.com/guide/agents/download/#changelog
|
|
195
|
+
* Issue tracker: https://todo.sr.ht/~arx10/procustodibus
|
|
196
|
+
* Mailing list: https://lists.sr.ht/~arx10/procustodibus
|
|
197
|
+
* Source code: https://git.sr.ht/~arx10/procustodibus-agent
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
License
|
|
201
|
+
-------
|
|
202
|
+
|
|
203
|
+
[The MIT License](https://git.sr.ht/~arx10/procustodibus-agent/tree/main/LICENSE)
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
Pro Custodibus Agent
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
[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.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Installing
|
|
8
|
+
----------
|
|
9
|
+
|
|
10
|
+
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:
|
|
11
|
+
```
|
|
12
|
+
./install.sh --install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or run it like the following to see more options:
|
|
16
|
+
```
|
|
17
|
+
./install.sh --help
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
See the [Installer Documentation](https://docs.procustodibus.com/guide/agents/install/) for full details (or to download the pre-built Windows installer).
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Docker
|
|
24
|
+
------
|
|
25
|
+
|
|
26
|
+
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.
|
|
27
|
+
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
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:
|
|
31
|
+
```
|
|
32
|
+
docker run \
|
|
33
|
+
--cap-add NET_ADMIN \
|
|
34
|
+
--publish 51820:51820/udp \
|
|
35
|
+
--name wireguard \
|
|
36
|
+
--rm \
|
|
37
|
+
--volume /srv/containers/wireguard/conf:/etc/wireguard \
|
|
38
|
+
procustodibus/agent
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
See the [Container Documentation](https://docs.procustodibus.com/guide/agents/container/) for full details.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
Development
|
|
45
|
+
-----------
|
|
46
|
+
|
|
47
|
+
### Set up dev env
|
|
48
|
+
|
|
49
|
+
Install [uv](https://docs.astral.sh/uv/), and from this project root run:
|
|
50
|
+
```
|
|
51
|
+
uv python install
|
|
52
|
+
uv sync
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Dev tasks
|
|
56
|
+
|
|
57
|
+
Run unit tests:
|
|
58
|
+
```
|
|
59
|
+
uv run pytest
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Run unit tests in watch mode:
|
|
63
|
+
```
|
|
64
|
+
uv run ptw .
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Run unit tests with coverage report:
|
|
68
|
+
```
|
|
69
|
+
uv run pytest --cov --cov-report term-missing
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Run linter and auto-fix where possible:
|
|
73
|
+
```
|
|
74
|
+
uv run ruff check --fix
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Run formatter:
|
|
78
|
+
```
|
|
79
|
+
uv run ruff format
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Build and run docker dev image (with `*.conf` files in `/srv/containers/wireguard/conf`):
|
|
83
|
+
```
|
|
84
|
+
docker/dev.sh dev
|
|
85
|
+
docker run \
|
|
86
|
+
--cap-add NET_ADMIN \
|
|
87
|
+
--publish 51820:51820/udp \
|
|
88
|
+
--name wireguard \
|
|
89
|
+
--rm \
|
|
90
|
+
--volume /srv/containers/wireguard/conf:/etc/wireguard \
|
|
91
|
+
procustodibus-agent:dev
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Run all (docker-based) installer tests:
|
|
95
|
+
```
|
|
96
|
+
docker compose -f test_install/docker-compose.yml build --pull
|
|
97
|
+
uv run pytest test_install
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Build Windows MSI
|
|
101
|
+
|
|
102
|
+
Install [uv](https://docs.astral.sh/uv/), and from this project root run:
|
|
103
|
+
```
|
|
104
|
+
uv run --python 3.12 --group freeze cx_freeze_setup.py bdist_msi
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The MSI package will be built as `dist\procustodibus_agent-x.x.x-win64.msi`.
|
|
108
|
+
|
|
109
|
+
### Build Windows installer exe
|
|
110
|
+
|
|
111
|
+
1. Install [uv](https://docs.astral.sh/uv/).
|
|
112
|
+
|
|
113
|
+
2. Install [Inno Setup](https://jrsoftware.org/isdl.php).
|
|
114
|
+
|
|
115
|
+
3. Build the Windows executables with cx_freeze:
|
|
116
|
+
```
|
|
117
|
+
uv run --python 3.12 --group freeze cx_freeze_setup.py build_exe
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
4. Build the Windows installer with Inno Setup:
|
|
121
|
+
```
|
|
122
|
+
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\windows.iss
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The installer will be built as `dist\ProCustodibusAgentInstaller.exe`.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
Contributing
|
|
129
|
+
------------
|
|
130
|
+
|
|
131
|
+
* [Code of Conduct](https://docs.procustodibus.com/community/conduct/)
|
|
132
|
+
* [File a Bug](https://docs.procustodibus.com/guide/community/bugs/)
|
|
133
|
+
* [Report a Vulnerability](https://docs.procustodibus.com/guide/community/vulns/)
|
|
134
|
+
* [Submit a Patch](https://docs.procustodibus.com/guide/community/code/)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
Resources
|
|
138
|
+
---------
|
|
139
|
+
|
|
140
|
+
* Home page: https://www.procustodibus.com/
|
|
141
|
+
* Documentation: https://docs.procustodibus.com/guide/agents/run/
|
|
142
|
+
* Changelog: https://docs.procustodibus.com/guide/agents/download/#changelog
|
|
143
|
+
* Issue tracker: https://todo.sr.ht/~arx10/procustodibus
|
|
144
|
+
* Mailing list: https://lists.sr.ht/~arx10/procustodibus
|
|
145
|
+
* Source code: https://git.sr.ht/~arx10/procustodibus-agent
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
License
|
|
149
|
+
-------
|
|
150
|
+
|
|
151
|
+
[The MIT License](https://git.sr.ht/~arx10/procustodibus-agent/tree/main/LICENSE)
|