That would explain it. This variable, proxy.connection.server.dst.name, was added in Proxy 0.7.0. So it would not have been available in 0.6.0.
However, it should work fine in 0.8.0. The only thing I should note is that in 0.8.0, the auth packet is no longer passed to read_handshake(), but you can still access the information stored in the connection tables (i.e., proxy.connection.server.dst.name, proxy.connection.client.dst.name, etc.).
I'd also like to point out the following blog post I wrote:
http://www.chriscalender.com/?p=84
It is basically a trace function which allows you to see all of the available variables that you can access within a lua script, how to access them, and a trace of the various functions as a statement is routed through proxy. So that may be helpful.
And just so you know, I added your code (the following 6 lines) to my read_handshake() function in the above script, and it output the information correctly:
print("<-- let's send him some information about us")
print(" mysqld-version: " .. proxy.connection.server.mysqld_version)
print(" thread-id : " .. proxy.connection.server.thread_id)
print(" scramble-buf : " .. string.format("%q",proxy.connection.server.scramble_buffer))
print(" server-addr : " .. proxy.connection.server.dst.name)
print(" client-addr : " .. proxy.connection.client.dst.name)
Here is the output snippet from just that function:
/* Entering function read_handshake() */
Handshake information is sent by the server to the client
after the initial connection (through connect_server()) has
been made. read_handshake() doesn't receive a parameter
anymore. Instead all the data is available in the connection
tables.
<-- let's send him some information about us
mysqld-version: 50090
thread-id : 34
scramble-buf : ":(Yft7Sy+gGljQ4OqkHb"
server-addr : 127.0.0.1:3306
client-addr : 127.0.0.1:4040
...
So you can see it outputs the information I had, and then it displays the information you are seeking.
I hope this helps.