Tunnelbroker-side of media mirroring. The diff is big, but these changes make sense altogether:
- Intercepted Farcaster HTTP request to messages endpoint
- Added Blob Client method to call media mirroring endpoint, and small utility for authentication
- Updated config, terraform, env variables to access Blob service from Tunnelbroker. We need both actual and public URLs - the former for calling the service, the latter for generating URLs
Intercepting:
- Get the response text, skip if the endpoint wasnt the messages endpoint
- Parse the response, fetch media metadata if present.
- Collect media URLs and metadata, replace them with Blob-hosted URLs
- In a separate task, call Blob to mirror collected media.
- If everything succeeds, return the intercepted response. Otherwise (if anything fails or Blob times out), fall back to the original response.
Depends on D15340