2.5 KiB
Architecture
Release path
- Debian cron runs once per hour.
- It refreshes the packaging repository containing this plugin/build logic.
- Independently, it fetches
APP_REPO_REFfromhttps://git.linuxiarz.pl/gru/RustProxyintoAPP_WORKDIR. - It compares both current commits with the last successful build state.
- If either commit changed, Debian rsyncs the packaging tree and the RustProxy checkout separately to a FreeBSD 15.1 amd64 builder.
- FreeBSD reads the application version from the downloaded
Cargo.toml, runs Cargo tests and a release build. - The binary is injected into
opnsense-plugin/www/rustproxy/src/sbin/rust-proxyinside a clean checkout of the official OPNsense plugins tree. make packagecreatesos-rustproxy-<version>_<revision>.pkg.pkg repocreates a signed package repository.- Debian downloads
dist/and optionally publishes it over rsync/SSH. - OPNsense consumes only the custom RustProxy package repository.
The packaging repository deliberately contains no app/ directory. This prevents stale application code from accidentally being packaged.
Upstream selection
Default configuration:
APP_REPO_URL=https://git.linuxiarz.pl/gru/RustProxy
APP_REPO_REF=HEAD
HEAD follows the repository's default branch. To freeze releases, set APP_REPO_REF to a branch, tag or other fetchable ref. The exact commit used for each package is written to dist/BUILD-INFO.txt.
Why native FreeBSD for releases
Rust can cross-compile to x86_64-unknown-freebsd, but a release also needs the target ABI and FreeBSD/OPNsense packaging behavior. A native FreeBSD builder makes both the Rust link step and pkg metadata/catalog generation match the target platform. The Docker/cross path is intended for fast developer validation only.
OPNsense plugin behavior
The first UI version exposes only general.enabled.
- Enabled: the service controller renders configuration and starts RustProxy through configd.
- Disabled: the service controller stops RustProxy.
- Boot: an OPNsense syshook regenerates configuration and starts the service only when enabled.
RustProxy runs as the unprivileged rustproxy user. Its data is stored in /var/db/rustproxy and logs in /var/log/rustproxy/rustproxy.log.
Ports 80 and 443
The MVP does not run RustProxy as root. Keep initial listeners above port 1023. If public 80/443 is required later, prefer an explicit PF redirect from 80/443 to high RustProxy listener ports instead of running the whole proxy as root.