renterd icon indicating copy to clipboard operation
renterd copied to clipboard

Extend autopilot with support for external host provider

Open ChrisSchinnerl opened this issue 1 year ago • 0 comments

It would be nice to be able to hook the autopilot up to a third party service that provides an automatically updated list of good/bad hosts from a trusted source.

The way I think it could work is via a new setting in the bus. e.g. using the hostprovider key and a json value like

{
  "url": "https://hostproviders.com/api/besthosts"
}

The autopilot would check if that setting is set and if so send a GET request to that endpoint at the beginning of each contract maintenance iteration in Run (autopilot/autopilot.go).

The standardised response could look like this:

{
  "blocked": [...],
  "allowed": [...]
}

The autopilot then computes a diff between already blocked/allowed hosts and the one from the response and applies the delta on the bus.

ChrisSchinnerl avatar Oct 06 '23 09:10 ChrisSchinnerl