allow to specify ignored interfaces (#514)

This commit is contained in:
Christoph Haas
2025-09-08 22:31:53 +02:00
parent 6d2a5fa6de
commit 0c291a4eff
5 changed files with 90 additions and 58 deletions

View File

@@ -10,6 +10,12 @@ const LocalBackendName = "local"
type Backend struct {
Default string `yaml:"default"` // The default backend to use (defaults to the internal backend)
// Local Backend-specific configuration
IgnoredLocalInterfaces []string `yaml:"ignored_local_interfaces"` // A list of interface names that should be ignored by this backend (e.g., "wg0")
// External Backend-specific configuration
Mikrotik []BackendMikrotik `yaml:"mikrotik"`
}
@@ -42,6 +48,8 @@ func (b *Backend) Validate() error {
type BackendBase struct {
Id string `yaml:"id"` // A unique id for the backend
DisplayName string `yaml:"display_name"` // A display name for the backend
IgnoredInterfaces []string `yaml:"ignored_interfaces"` // A list of interface names that should be ignored by this backend (e.g., "wg0")
}
// GetDisplayName returns the display name of the backend.