def connection_type(proxies):
    """Returns a string describing the connection type for use in metrics.

    """
    request_scheme = 'https'
    if proxies is None:
        return 'direct/%s' % request_scheme
    proxy_scheme = proxies['http'].split('://')[0]
    return '%s-proxy/%s' % (proxy_scheme, request_scheme)
