private void parseSrcAddr(HAProxyMessage hapm, Channel channel) {
        String sourceAddress = hapm.sourceAddress();
        if (sourceAddress != null) {
            channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).set(sourceAddress);

            SocketAddress srcAddr;
            switch (hapm.proxiedProtocol()) {
                case UNKNOWN:
                    throw new IllegalArgumentException("unknown proxy protocol" + sourceAddress);
                case TCP4:
                case TCP6:
                    InetSocketAddress inetAddr;
                    srcAddr =
                            inetAddr = new InetSocketAddress(InetAddresses.forString(sourceAddress), hapm.sourcePort());
                    Attrs attrs = channel.attr(Server.CONN_DIMENSIONS).get();
                    if (inetAddr.getAddress() instanceof Inet4Address) {
                        HAPM_SRC_IP_VERSION.put(attrs, "v4");
                    } else if (inetAddr.getAddress() instanceof Inet6Address) {
                        HAPM_SRC_IP_VERSION.put(attrs, "v6");
                    } else {
                        HAPM_SRC_IP_VERSION.put(attrs, "unknown");
                    }
                    break;
                case UNIX_STREAM: // TODO: implement
                case UDP4:
                case UDP6:
                case UNIX_DGRAM:
                    throw new IllegalArgumentException("unknown proxy protocol" + sourceAddress);
                default:
                    throw new AssertionError(hapm.proxiedProtocol());
            }
            channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).set(srcAddr);
        }
    }
Copies any decoded HAProxyMessage into the channel attributes, and doesn't pass it any further along the pipeline.
Use in conjunction with HAProxyMessageDecoder if proxy protocol is enabled on the ELB.
zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java