Skip to content

OPNsense plugin for Gateway 2.0#290

Merged
moubctez merged 3 commits intodevfrom
opnsense_plugin_2
Mar 18, 2026
Merged

OPNsense plugin for Gateway 2.0#290
moubctez merged 3 commits intodevfrom
opnsense_plugin_2

Conversation

@moubctez
Copy link
Contributor

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Defguard Gateway OPNsense plugin and gateway service metadata to align with Defguard Gateway 2.0 configuration, notably shifting to the new grpc_port/cert_dir-based setup.

Changes:

  • Update gateway CLI/version reporting and build metadata/dependencies for 2.0.0.
  • Revise OPNsense plugin model/form/template to match Gateway 2.0 config options (e.g., grpc_port, cert_dir, firewall/health options).
  • Improve OPNsense UI flow by adding an explicit Stop action and gating restart on successful reconfigure.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/config.rs Uses the crate VERSION (incl. git SHA) for clap version output.
build.rs Adjusts vergen git2 emission to only include SHA.
Cargo.toml Bumps clap and defguard git dependencies; simplifies vergen-git2 spec.
Cargo.lock Lockfile updates for dependency bumps (toml, winnow, defguard git rev, etc.).
opnsense/src/opnsense/service/templates/OPNsense/DefguardGateway/config.toml Reworks generated config for Gateway 2.0 fields (grpc_port, cert_dir, etc.).
opnsense/src/opnsense/mvc/app/views/OPNsense/DefguardGateway/index.volt Adds Stop button and restart gating after reconfigure.
opnsense/src/opnsense/mvc/app/models/OPNsense/DefguardGateway/DefguardGateway.xml Updates the plugin model fields/validation for new Gateway 2.0 options.
opnsense/src/opnsense/mvc/app/controllers/OPNsense/DefguardGateway/forms/general.xml Updates the UI form fields to match the updated model/config template.
opnsense/src/etc/inc/plugins.inc.d/defguardgateway.inc Aligns enabled flag naming and tightens device regex to the selected interface.
opnsense/Makefile Bumps plugin version to 2.0.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

moubctez and others added 2 commits March 18, 2026 10:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@moubctez moubctez merged commit e6b7fce into dev Mar 18, 2026
2 checks passed
@moubctez moubctez deleted the opnsense_plugin_2 branch March 18, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants