What is the purpose of setting byte 1 to 0 and byte 2 to 90 in the response to a SOCKS request in PHP?

Setting byte 1 to 0 and byte 2 to 90 in the response to a SOCKS request in PHP indicates a successful connection establishment. This means that the SOCKS server has successfully connected to the requested destination. By setting these specific bytes in the response, the client initiating the request will know that the connection was successful and can proceed with the data transfer.

// Sending a successful connection establishment response to a SOCKS request
$response = "\x05\x00\x00\x01\x00\x00\x00\x00\x00\x00";
socket_write($clientSocket, $response, strlen($response));