mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 18:07:33 +00:00

committed by
Kristoffer Dalby

parent
e55fe0671a
commit
13a7285658
@@ -32,6 +32,8 @@ import (
|
||||
const (
|
||||
nextDNSDoHPrefix = "https://dns.nextdns.io"
|
||||
reservedResponseHeaderSize = 4
|
||||
mapperIDLength = 8
|
||||
debugMapResponsePerm = 0o755
|
||||
)
|
||||
|
||||
var debugDumpMapResponsePath = envknob.String("HEADSCALE_DEBUG_DUMP_MAPRESPONSE_PATH")
|
||||
@@ -72,7 +74,7 @@ func NewMapper(
|
||||
Str("machine", machine.Hostname).
|
||||
Msg("creating new mapper")
|
||||
|
||||
uid, _ := util.GenerateRandomStringDNSSafe(8)
|
||||
uid, _ := util.GenerateRandomStringDNSSafe(mapperIDLength)
|
||||
|
||||
return &Mapper{
|
||||
db: db,
|
||||
@@ -579,7 +581,7 @@ var zstdEncoderPool = &sync.Pool{
|
||||
},
|
||||
}
|
||||
|
||||
func (m *Mapper) baseMapResponse(machine *types.Machine) tailcfg.MapResponse {
|
||||
func (m *Mapper) baseMapResponse(_ *types.Machine) tailcfg.MapResponse {
|
||||
now := time.Now()
|
||||
|
||||
resp := tailcfg.MapResponse{
|
||||
|
Reference in New Issue
Block a user