vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.7k stars 2.1k forks source link

Feature Request: Expose underlying LocalAddr() for connections #17255

Closed desdic closed 2 days ago

desdic commented 2 days ago

Feature Description

when using multiple IP its sometimes nice to know which IP the client connected to

Use Case(s)

having multiple IP's for the server

desdic commented 2 days ago

Added a PR https://github.com/vitessio/vitess/pull/17256

dbussink commented 2 days ago

What are you trying to solve here? How are you using Vitess?

desdic commented 2 days ago

I'm using vitess for authentication mysql/mariadb in a proxy I'm creating. I need the toIP to check which authentication system I need to resolve the user (and where to send the request). But the underlying connection is not exposed so by adding a simple function I can now get the IP that is connected to.

desdic commented 2 days ago

oh this is embarrassing that I actually missed that one. Thank you, I'll close my PR.