RongtongJin opened a new issue, #7008: URL: https://github.com/apache/rocketmq/issues/7008
### Before Creating the Bug Report - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions). - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate. - [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ. ### Runtime platform environment Linux ### RocketMQ version develop branch ### JDK Version 1.8 ### Describe the Bug When both haproxy and tls protocols are enabled on the server at the same time, the received packet is first haproxy protocol, then tls protocol.  the ssl handshake uses the first byte to determine if it is the first package of tls handshake now. However, the read index is shifted due to the previous haproxy protocol parsing, so it needs to be changed to judge the first byte on the current read index.  ### Steps to Reproduce 1. The server opens both haproxy and tls protocols at the same time. 2. The client sends messages using tls. 3. The message sending fails and the connection cannot be established. ### What Did You Expect to See? Message sending works normally. ### What Did You See Instead? Message sending fails. ### Additional Context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
