1. 18 Dec, 2020 1 commit
    • Philipp Winter's avatar
      Fix bug where test cache timeout was ignored. · 5a0e7d48
      Philipp Winter authored
      When bridgestrap read its cache from disk, it wouldn't only read the
      cache entries but also the cache timeout, overriding whatever we
      provided over the command line.  In other words, if bridgestrap saved a
      cache whose timeout was set to 24h, and we later restart bridgestrap
      with a given cache timeout of 18h, it would use 24h because that's what
      it read from disk.
      
      This patch fixes this bug in two ways: 1) we no longer write the cache
      timeout to disk and 2) we set the cache timeout after reading the cached
      entries from disk.
      5a0e7d48
  2. 21 Nov, 2020 1 commit
    • Philipp Winter's avatar
      Implement Prometheus-based metrics. · 337a3afa
      Philipp Winter authored
      The way Prometheus works is that a central instance scrapes metrics from
      various endpoints, bridgestrap being one of them.  We expose a new HTTP
      handler for /metrics and let our Prometheus library do the rest.
      
      This patch fixes #4
      337a3afa
  3. 20 Nov, 2020 1 commit
    • Philipp Winter's avatar
      Add -cache-timeout command line switch. · ca74ead2
      Philipp Winter authored
      So far, our cache timeout was hard-coded to be one week.  Now that
      bridgestrap is more efficient, we can afford to test resources more
      often, so this patch changes the default timeout to 24 hours.  The patch
      also makes this timeout configurable through the new -cache-timeout
      switch.
      
      While at it, the patch also refactored our cache mechanism a bit and
      renamed -timeout to -test-timeout.
      
      This patch fixes #8
      ca74ead2
  4. 16 Nov, 2020 1 commit
  5. 15 Oct, 2020 1 commit
    • Philipp Winter's avatar
      Replace testing mechanism and use SETCONF instead. · d260aa1f
      Philipp Winter authored
      So far, bridgestrap would bootstrap a new tor instance for each request.
      That's both expensive and slow.  Roger suggested to use a single,
      long-lived tor instance instead, and use the SETCONF controller command
      to test a batch of bridges at once.  This patch makes that happen.
      
      This fixes #3.
      d260aa1f