02 October 2015

goshowmyip is a simple weekend project written in Golang. It listens on TCP/8080 for incoming HTTP connections and returns the IP address aswell as the User Agent of the incoming HTTP request to the client. As an additional gimmick, the web app also loads a random kitten picture from flickr. In order to comply with the Creative Commons license, the license name and the flickr username are displayed below the photo. Check out the live demo here. You can find the source code on GitHub

The idea is to run this behind a reverse proxy, preferably nginx. Make sure to forward the source address of the request to the web app. See the README for additional installation instructions.

Currently, the web app is pretty slow due to the latency of the flickr API. I'm planing to implement some JavaScript that fetches the address for the random image from a different url (e.g. ../image). This would improve loading time tremendously, since we don't have to wait for the flickr API to eventually return a cute kitten image.