-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is SSLRequest not supported by Frontend Receive()? #15
Comments
pgproto3 has support for TLS (see ssl_request), but pgmockproxy is not handling the SSLRequest. Since pgmockproxy is just a simple testing proxy, you could connect with |
@yulicrunchy thank you 🙏 in retrospect it's funny this didn't occur to me. Naturally I would have to do TLS termination in the proxy to be able to read the queries the user is sending 🤦 I guess I wonder how I will set up a TLS connection to the remote though because of the |
@andheiberg @gitstashpop I'm needing to connect to a backend server that only supports connections over TLS. Does anyone have an example of how to implement that? Down the line I'd probably like to enable TLS from the proxy, so clients connecting to it can also connect via TLS, but my first concern is being able to connect to a backend postgres instances that enforces TLS. I realise I'm commenting on a really old thread here, but any help pointing me in the right direction would be hugely appreciated. |
Hi 👋,
Sorry if this question has an obvious answer. I have no experience with GO nor the PG wire protocol.
But I've had some trouble running https://github.com/jackc/pgmock/tree/master/pgmockproxy and think I've figured out why.
Behaviour:
Debugging:
I found the following in the PG docs:
My understanding of the issue is therefore:
p.backend.ReceiveStartupMessage()
.p.frontend.Send(msg)
p.frontend.Receive()
header, err := f.cr.Next(5)
i.e. it waits for 5 bytes to be received and it has only received 1 byte.Step 5 being the problem.
Questions:
The text was updated successfully, but these errors were encountered: