mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-04 20:49:24 +09:00
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. Fixes ANT-2026-RQS7JAPP Fixes ANT-2026-5B6KE87K Fixes ANT-2026-KFCFFM34
25 lines
541 B
Go
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
|
|
)
|