Software programmer interested in SRE, DevOps, Machine Learning and Augmented Reality.
Proxy Protocol: what is it and how to use it with Go
Today I became aware of the proxy protocol. The Proxy Protocol was designed to chain proxies / reverse-proxies without losing the client information. If you are proxying an HTTP(S) server, chances are that you have used the X-Forwarded-From header to keep the real remote address of the client making the request and not receving the proxy’s address instead. But this only works for HTTP(S): if you are proxying any other kind of TCP service, you are doomed.
On Go package names
Or why I renamed github.com/inkel/go-proxy-protocol to github.com/inkel/viaproxy. In my previous article I introduced a repository that hold the code to create net.Conn objects aware of the proxy protocol, but I wasn’t happy with the name of the repository. Package names are important in Go, and one aspect that we tend to overlook is that they actually are part of the calling signature when you want to use an export type or function.
lruc: a reverse cURL
Today Thorsten Ball asked a simple question on Twitter: Does something like a reverse-curl exist? A tool that allows me to listen on a socket and return one HTTP response? — Thorsten Ball (@thorstenball) October 27, 2017 After a brief exchange of tweets, I said: Or we could write one in Go 😺 — Lean (inkel) (@inkel) October 27, 2017 Twenty minutes later lruc was born. Oh wow! :)