mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-30 02:43:05 +00:00
Support for Noise machines in getPeers
This commit is contained in:
parent
aaa33cf093
commit
ab18c721bb
1 changed files with 8 additions and 5 deletions
|
@ -600,12 +600,15 @@ func (machine Machine) toNode(
|
||||||
}
|
}
|
||||||
|
|
||||||
var machineKey key.MachinePublic
|
var machineKey key.MachinePublic
|
||||||
|
if machine.MachineKey != "" {
|
||||||
|
// MachineKey is only used in the legacy protocol
|
||||||
err = machineKey.UnmarshalText(
|
err = machineKey.UnmarshalText(
|
||||||
[]byte(MachinePublicKeyEnsurePrefix(machine.MachineKey)),
|
[]byte(MachinePublicKeyEnsurePrefix(machine.MachineKey)),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to parse machine public key: %w", err)
|
return nil, fmt.Errorf("failed to parse machine public key: %w", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var discoKey key.DiscoPublic
|
var discoKey key.DiscoPublic
|
||||||
if machine.DiscoKey != "" {
|
if machine.DiscoKey != "" {
|
||||||
|
|
Loading…
Reference in a new issue