func (pp *proxyParser) remoteAddr(orig net.Addr) net.Addr {
	if pp.SrcIP != nil {
		switch orig.(type) {
		case *net.TCPAddr:
			return &net.TCPAddr{
				IP:   pp.SrcIP,
				Port: pp.SrcPort,
			}
		case *net.UDPAddr:
			return &net.UDPAddr{
				IP:   pp.SrcIP,
				Port: pp.SrcPort,
			}
		}
	}
	return orig
}
// remoteAddr returns remote address as conveyed in the PROXY header
remoteAddr returns remote address as conveyed in the PROXY header
// remoteAddr returns remote address as conveyed in the PROXY header
func (pp *proxyParser) remoteAddr(orig net.Addr) net.Addr {
	if pp.SrcIP != nil {
		switch orig.(type) {
		case *net.TCPAddr:
			return &net.TCPAddr{
				IP:   pp.SrcIP,
				Port: pp.SrcPort,
			}
		case *net.UDPAddr:
			return &net.UDPAddr{
				IP:   pp.SrcIP,
				Port: pp.SrcPort,
			}
		}
	}
	return orig
}
func ( pp * proxyParser ) remoteAddr ( orig net . Addr ) net . Addr { if pp . SrcIP != nil { switch orig . ( type ) { case * net . TCPAddr : return & net . TCPAddr { IP : pp . SrcIP , Port : pp . SrcPort , } case * net . UDPAddr : return & net . UDPAddr { IP : pp . SrcIP , Port : pp . SrcPort , } } } return orig }
remoteAddr returns remote address as conveyed in the PROXY header
remoteAddr returns remote address as conveyed in the PROXY header