mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
[client, management] Support DNS Labels for Peer Addressing (#3252)
* [client] Support Extra DNS Labels for Peer Addressing * [management] Support Extra DNS Labels for Peer Addressing --------- Co-authored-by: Viktor Liu <17948409+lixmal@users.noreply.github.com>
This commit is contained in:
@@ -49,6 +49,11 @@ type Peer struct {
|
||||
Ephemeral bool `gorm:"index"`
|
||||
// Geo location based on connection IP
|
||||
Location Location `gorm:"embedded;embeddedPrefix:location_"`
|
||||
|
||||
// ExtraDNSLabels is a list of additional DNS labels that can be used to resolve the peer
|
||||
ExtraDNSLabels []string `gorm:"serializer:json"`
|
||||
// AllowExtraDNSLabels indicates whether the peer allows extra DNS labels to be used for resolving the peer
|
||||
AllowExtraDNSLabels bool
|
||||
}
|
||||
|
||||
type PeerStatus struct { //nolint:revive
|
||||
@@ -202,6 +207,8 @@ func (p *Peer) Copy() *Peer {
|
||||
Ephemeral: p.Ephemeral,
|
||||
Location: p.Location,
|
||||
InactivityExpirationEnabled: p.InactivityExpirationEnabled,
|
||||
ExtraDNSLabels: slices.Clone(p.ExtraDNSLabels),
|
||||
AllowExtraDNSLabels: p.AllowExtraDNSLabels,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user