I have an HTTP server that terminates TLS connections from the Internet, and have been running with recent builds of Go. It currently accepts HTTP/2 connections which is pretty cool, but it itself is basically just delegates the rest of the connection to another locally running Go server. I am using the net/http/httputil reverse proxy for this. I would prefer to use a Unix Domain Socket for the backend server to accept connection from the TLS terminator, to keep the amount of latency down. Currently it's just using a localhost socket.
My question is: Can the httputil.ReverseProxy work with a unix socket instead of a tcp/ip one, and can the connection be in plaintext if the incoming request was HTTP/2? Reading the source, it seems that ReverseProxy take
explicit measures to use HTTP/1.1.