Add per-IP rate limiting and Unix socket support for gRPC admin API

Rate limiting: per-source-IP connection rate limiter in the firewall layer
with configurable limit and sliding window. Blocklisted IPs are rejected
before rate limit evaluation to avoid wasting quota. Unix socket: the gRPC
admin API can now listen on a Unix domain socket (no TLS required), secured
by file permissions (0600), as a simpler alternative for local-only access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-17 14:37:21 -07:00
parent e84093b7fb
commit b25e1b0e79
16 changed files with 694 additions and 43 deletions

View File

@@ -165,6 +165,9 @@ func parseServerNameExtension(data []byte) (string, error) {
}
if nameType == 0x00 { // hostname
if nameLen > 255 {
return "", fmt.Errorf("SNI hostname exceeds 255 bytes")
}
return strings.ToLower(string(data[:nameLen])), nil
}