mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-31 02:34:07 +09:00
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
26 lines
571 B
Go
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
|
|
)
|