cidr support #4

Open
opened 2025-01-11 09:58:33 +00:00 by unusualevent · 0 comments
Owner

if allowing CIDR ranges...

ipAddress, ipNet, err := net.ParseCIDR("123.45.67.64/27") <- from settings
ipNet.Contains(net.ParseIP("123.45.67.69") <- from r.RemoteAddr (unless r.Header.Get("X-Forwarded-For"), in which case it either needs to be told the depth, or the list of trusted proxy addresses, or learn those, guess, and display to the user)

if allowing CIDR ranges... ipAddress, ipNet, err := net.ParseCIDR("123.45.67.64/27") <- from settings ipNet.Contains(net.ParseIP("123.45.67.69") <- from r.RemoteAddr (unless r.Header.Get("X-Forwarded-For"), in which case it either needs to be told the depth, or the list of trusted proxy addresses, or learn those, guess, and display to the user)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: use/haunt#4
No description provided.