smart proxy discovery

Leftovers? Do we support HTTPS as well? We should as it's the default setup on production environments.