mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-24 08:47:49 +00:00
Support for Noise machines in getPeers
This commit is contained in:
parent
aaa33cf093
commit
ab18c721bb
13
machine.go
13
machine.go
@ -600,11 +600,14 @@ func (machine Machine) toNode(
|
|||||||
}
|
}
|
||||||
|
|
||||||
var machineKey key.MachinePublic
|
var machineKey key.MachinePublic
|
||||||
err = machineKey.UnmarshalText(
|
if machine.MachineKey != "" {
|
||||||
[]byte(MachinePublicKeyEnsurePrefix(machine.MachineKey)),
|
// MachineKey is only used in the legacy protocol
|
||||||
)
|
err = machineKey.UnmarshalText(
|
||||||
if err != nil {
|
[]byte(MachinePublicKeyEnsurePrefix(machine.MachineKey)),
|
||||||
return nil, fmt.Errorf("failed to parse machine public key: %w", err)
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to parse machine public key: %w", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var discoKey key.DiscoPublic
|
var discoKey key.DiscoPublic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user