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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user