MySQL Forums
Forum List  »  Router & Proxy

Re: Get client ip address
Posted by: Kay Roepke
Date: March 18, 2008 03:57PM

zoyoo - Wrote:
-------------------------------------------------------
> Is it possible to get client ip address before
> read_handshake() in the lua script ? in
> read_handshake() there is an auth.client_addr
> however it might not work for my case:
>
> A scnario is when a query reaches mysql proxy, i
> need to decide which specific server it goes to
> base on the client addr, which means, I need to
> get the client_addr in connect_server() to decide
> which value I set for connection.backend_ndx

Hi!

You can use the proxy.connection.client.address table entry.
It is set for each connection and available once a client connects, thus
also in connect_server()

HTH,

Kay

Options: ReplyQuote


Subject
Views
Written By
Posted
14709
March 16, 2008 03:23PM
5754
March 16, 2008 03:36PM
Re: Get client ip address
7069
March 18, 2008 03:57PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.