mirror of
https://github.com/h44z/wg-portal.git
synced 2026-09-03 21:36:44 +00:00
* Add dynamic Mikrotik peer support & UI/i18n Introduce handling for dynamically created Mikrotik peers: add Dynamic/IsDynamic fields to domain, peer and interface models and API models; include "dynamic" in Mikrotik queries; skip updates/deletes for dynamic peers; sync dynamic flag when restoring state. Prevent modifying/deleting dynamic peers in manager. UI: disable selection/edit for dynamic peers and show badge. Implement Mikrotik interface hook execution. Add i18n keys/translations for dynamic-peer messages across languages. * Fix Mikrotik hooks implementation and UI visibility
52 lines
1.1 KiB
Go
52 lines
1.1 KiB
Go
package domain
|
|
|
|
// ControllerType defines the type of controller used to manage interfaces.
|
|
|
|
const (
|
|
ControllerTypeMikrotik = "mikrotik"
|
|
ControllerTypeLocal = "wgctrl"
|
|
ControllerTypePfsense = "pfsense"
|
|
)
|
|
|
|
// 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
|
|
Dynamic bool
|
|
ClientEndpoint string
|
|
ClientAddress string
|
|
ClientDns string
|
|
ClientKeepalive int
|
|
}
|
|
|
|
type LocalPeerExtras struct {
|
|
Disabled bool
|
|
}
|
|
|
|
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
|
|
}
|