Proxy support #29

Fix using correct proxy on startup and correctly react
to changes in the proxy settings.