2025-08-10 14:42:02 +02:00
|
|
|
package domain
|
|
|
|
|
|
|
|
|
|
// ControllerType defines the type of controller used to manage interfaces.
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
ControllerTypeMikrotik = "mikrotik"
|
|
|
|
|
ControllerTypeLocal = "wgctrl"
|
2025-12-09 22:33:12 +01:00
|
|
|
ControllerTypePfsense = "pfsense"
|
2026-09-10 22:27:17 +02:00
|
|
|
ControllerTypeOpnsense = "opnsense"
|
2025-08-10 14:42:02 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Controller extras can be used to store additional information available for specific controllers only.
|
|
|
|
|
|
|
|
|
|
type MikrotikInterfaceExtras struct {
|
|
|
|
|
Id string // internal mikrotik ID
|
|
|
|
|
Comment string
|
|
|
|
|
Disabled bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type MikrotikPeerExtras struct {
|
|
|
|
|
Id string // internal mikrotik ID
|
|
|
|
|
Name string
|
|
|
|
|
Comment string
|
|
|
|
|
IsResponder bool
|
|
|
|
|
Disabled bool
|
2026-08-27 09:47:23 +02:00
|
|
|
Dynamic bool
|
2025-08-10 14:42:02 +02:00
|
|
|
ClientEndpoint string
|
|
|
|
|
ClientAddress string
|
|
|
|
|
ClientDns string
|
|
|
|
|
ClientKeepalive int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type LocalPeerExtras struct {
|
|
|
|
|
Disabled bool
|
|
|
|
|
}
|
2025-12-09 22:33:12 +01:00
|
|
|
|
|
|
|
|
type PfsenseInterfaceExtras struct {
|
|
|
|
|
Id string // internal pfSense ID
|
|
|
|
|
Comment string
|
|
|
|
|
Disabled bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type PfsensePeerExtras struct {
|
|
|
|
|
Id string // internal pfSense ID
|
|
|
|
|
Name string
|
|
|
|
|
Comment string
|
|
|
|
|
Disabled bool
|
|
|
|
|
ClientEndpoint string
|
|
|
|
|
ClientAddress string
|
|
|
|
|
ClientDns string
|
|
|
|
|
ClientKeepalive int
|
|
|
|
|
}
|
2026-09-10 22:27:17 +02:00
|
|
|
|
|
|
|
|
type OpnsenseInterfaceExtras struct {
|
|
|
|
|
Uuid string // internal OPNsense UUID of the WireGuard "server" (tunnel)
|
|
|
|
|
Instance string // the wg instance number; OPNsense derives the device name (wg0) from it
|
|
|
|
|
Comment string
|
|
|
|
|
Disabled bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type OpnsensePeerExtras struct {
|
|
|
|
|
Uuid string // internal OPNsense UUID of the WireGuard "client" (peer)
|
|
|
|
|
Name string
|
|
|
|
|
Comment string
|
|
|
|
|
Disabled bool
|
|
|
|
|
ClientEndpoint string
|
|
|
|
|
ClientAddress string
|
|
|
|
|
ClientDns string
|
|
|
|
|
ClientKeepalive int
|
|
|
|
|
}
|