context.go
func (ctx *Context) RemoteAddr() string {
	addr := ctx.Req.Header.Get("X-Real-IP")
	if len(addr) == 0 {
		addr = ctx.Req.Header.Get("X-Forwarded-For")
		if addr == "" {
			addr = ctx.Req.RemoteAddr
			if i := strings.LastIndex(addr, ":"); i > -1 {
				addr = addr[:i]
			}
		}
	}
	return addr
}
func (ctx *Context) RemoteAddr() string {
	addr := ctx.Req.Header.Get("X-Real-IP")
	if len(addr) == 0 {
		addr = ctx.Req.Header.Get("X-Forwarded-For")
		if addr == "" {
			addr = ctx.Req.RemoteAddr
			if i := strings.LastIndex(addr, ":"); i > -1 {
				addr = addr[:i]
			}
		}
	}
	return addr
}
func ( ctx * Context ) RemoteAddr ( ) string { addr := ctx . Req . Header . Get ( " " ) if len ( addr ) == 0 { addr = ctx . Req . Header . Get ( " " ) if addr == " " { addr = ctx . Req . RemoteAddr if i := strings . LastIndex ( addr , " " ) ; i > - 1 { addr = addr [ : i ] } } } return addr }
// RemoteAddr returns more real IP address.
RemoteAddr returns more real IP address .