Skip to content

feat: Real client IP detection and -r flag - #4

Open
felix9743 wants to merge 2 commits into
hellotimking:mainfrom
felix9743:feat/real-ip
Open

feat: Real client IP detection and -r flag#4
felix9743 wants to merge 2 commits into
hellotimking:mainfrom
felix9743:feat/real-ip

Conversation

@felix9743

Copy link
Copy Markdown
  • Branch: feat/real-ip
  • Goal: Display the visitor's real IP (from Caddy's client_ip field) instead of the proxy/load-balancer IP by default. Especially useful when trusted_proxies is configured in Caddy.
  • Changes:
    • Added client_ip field to the CaddyLog struct.
    • Overrode Request.RemoteIP with Request.ClientIP (if present) during JSON decoding.
    • Added -r / --remote-ip CLI flag to force using the connection IP (remote_ip) if needed.
    • Updated the help usage menu.

@felix9743 felix9743 changed the title Real Client IP Detection & -r Flag feat: Real client IP detection and -r flag Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant