1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Send StableID

This commit is contained in:
Juan Font Alonso 2021-02-22 23:27:33 +01:00
parent a20fffc3e9
commit 90759688ca

View File

@ -5,6 +5,7 @@ import (
"fmt"
"log"
"sort"
"strconv"
"time"
"github.com/jinzhu/gorm/dialects/postgres"
@ -81,7 +82,8 @@ func (m Machine) toNode() (*tailcfg.Node, error) {
}
n := tailcfg.Node{
ID: tailcfg.NodeID(m.ID), // this is the actual ID
ID: tailcfg.NodeID(m.ID), // this is the actual ID
StableID: tailcfg.StableNodeID(strconv.FormatUint(m.ID, 10)), // in headscale, unlike tailcontrol server, IDs are permantent
Name: "",
User: 1,
Key: tailcfg.NodeKey(nKey),