Files
headscale/hscontrol/types/const.go
T
Kristoffer Dalby 2e563635d0 types, noise: bound the Hostinfo and endpoints a client reports
Keep the first 256 endpoints and 4096 routes; refuse longer hostnames,
too many tags, zoned endpoints and >64 KiB NetInfo or other Hostinfo.
The body limit counted wire bytes, not what NodeStore and peers keep.

Fixes ANT-2026-RQS7JAPP
Fixes ANT-2026-5B6KE87K
Fixes ANT-2026-KFCFFM34
2026-10-29 14:00:02 +01:00

26 lines
571 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
)
// Client report limits are above what a stock client sends.
// MaxHostinfoSize applies separately to NetInfo and the remaining fields without routes.
const (
MaxEndpoints = 256
MaxRequestTags = 256
MaxRoutableIPs = 4096
MaxHostinfoSize = 64 << 10
)