xff

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientIP

func ClientIP(remoteAddr, xff, xri string, trusted []string) string

ClientIP extracts the real client IP address from remoteAddr, X-Forwarded-For, and X-Real-IP using the rightmost non-trusted proxy traversal algorithm.

func IsTrustedProxy

func IsTrustedProxy(ipStr string, trusted []string) bool

IsTrustedProxy checks if an IP string matches any trusted IP or CIDR block.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL