SkillAgentSearch skills...

Realip

a golang library that can get client's real public ip address from http request headers

Install / Use

/learn @tomasen/Realip
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

RealIP

GoDoc

Go package that can be used to get client's real public IP, which usually useful for logging HTTP server.

Feature

  • Follows the rule of X-Real-IP
  • Follows the rule of X-Forwarded-For
  • Exclude local or private address

Example

package main

import "github.com/tomasen/realip"

func (h *Handler) ServeIndexPage(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
	clientIP := realip.FromRequest(r)
	log.Println("GET / from", clientIP)
}

Developing

Commited code must pass:

View on GitHub
GitHub Stars237
CategoryDevelopment
Updated17d ago
Forks49

Languages

Go

Security Score

95/100

Audited on Mar 12, 2026

No findings