Files
headscale/hscontrol/types/const.go
T
Kristoffer Dalby c0f1f48483 types, noise: bound the Hostinfo and endpoints a client reports
Cut lists and hostname at decode, refuse >64 KiB of non-route Hostinfo.
The body limit counted wire bytes, not what the cache, NodeStore and
peers keep.
2026-10-27 21:32:33 +00:00

25 lines
541 B
Go

package types
import "time"
const (
HTTPTimeout = 30 * time.Second
HTTPShutdownTimeout = 3 * time.Second
TLSALPN01ChallengeType = "TLS-ALPN-01"
HTTP01ChallengeType = "HTTP-01"
DNS01ChallengeType = "DNS-01"
JSONLogFormat = "json"
TextLogFormat = "text"
MaxHostnameLength = 255
)
// Bounds on what a client reports, applied by [BoundHostinfo] and
// [BoundMapRequest]. They sit far above what a stock client sends.
const (
MaxReportedListLen = 256
MaxRoutableIPs = 4096
MaxHostinfoSize = 64 << 10
)