code: func (c *Context) ClientIP() string {
  	if c.engine.ForwardedByClientIP {
  		clientIP := c.requestHeader("X-Forwarded-For")
  		clientIP = strings.TrimSpace(strings.Split(clientIP, ",")[0])
  		if clientIP == "" {
  			clientIP = strings.TrimSpace(c.requestHeader("X-Real-Ip"))
  		}
  		if clientIP != "" {
  			return clientIP
  		}
  	}
  
  	if c.engine.AppEngine {
  		if addr := c.requestHeader("X-Appengine-Remote-Addr"); addr != "" {
  			return addr
  		}
  	}
  
  	if ip, _, err := net.SplitHostPort(strings.TrimSpace(c.Request.RemoteAddr)); err == nil {
  		return ip
  	}
  
  	return ""
  }
docs: // ClientIP implements a best effort algorithm to return the real client IP, it parses
  // X-Real-IP and X-Forwarded-For in order to work properly with reverse-proxies such us: nginx or haproxy.
  // Use X-Forwarded-For before X-Real-Ip as nginx uses X-Real-Ip with the proxy's IP.