Skip to content

tunnelbroker-v0.19.5

@barthap barthap tagged this 15 Sep 12:30
Summary:
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:
1. Get the response text, skip if the endpoint wasnt the messages endpoint
2. Parse the response, fetch media metadata if present.
3. Collect media URLs and metadata, replace them with Blob-hosted URLs
4. In a separate task, call Blob to mirror collected media.
5. If everything succeeds, return the intercepted response. Otherwise (if anything fails or Blob times out), fall back to the original response.

Depends on D15340

Test Plan: Tested on staging - verified that Blob-hosted media are unaffected, other media are mirrored. Checked timeouts and fallbacks to original response. Checked Blob Service logs for mirroring. Verified that client displays images correctly Checked Blob Service logs for mirroring. Verified that client displays images correctly.

Reviewers: kamil

Reviewed By: kamil

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D15341
Assets 2
Loading