use https when tls.Config is provided