class Acme::Client

def connection_for(url:, mode:)

def connection_for(url:, mode:)
  uri = URI(url)
  endpoint = "#{uri.scheme}://#{uri.hostname}:#{uri.port}"
  @connections ||= {}
  @connections[mode] ||= {}
  @connections[mode][endpoint] ||= Acme::Client::HTTPClient.new_acme_connection(
    url: URI(endpoint), mode: mode, client: self, options: @connection_options, bad_nonce_retry: @bad_nonce_retry
  )
end