@Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        if (msg instanceof HAProxyMessage proxyMessage) {
            InetSocketAddress remoteAddress = null;
            try {
                String sourceAddress = proxyMessage.sourceAddress();
                int sourcePort = proxyMessage.sourcePort();
                if (sourceAddress != null && sourcePort > 0) {
                    remoteAddress = AddressUtils.createUnresolved(sourceAddress, sourcePort);
                }
            } finally {
                proxyMessage.release();
            }

            ctx.channel()
                    .pipeline()
                    .remove(this);
            if (remoteAddress == null) {
                onRemoteAddressConfirmed.accept((InetSocketAddress) ctx.channel()
                        .remoteAddress());
            } else {
                onRemoteAddressConfirmed.accept(remoteAddress);
            }

            ctx.read();
        } else {
            super.channelRead(ctx, msg);
        }
    }
@author James Chen
@see {@link reactor.netty.http.server.HAProxyMessageReader}
turms-gateway/src/main/java/im/turms/gateway/access/client/tcp/ExtendedHAProxyMessageReader.java