Home | Notifications | New Note | Local | Federated | Search | Logout
Tadano@tadano@mt.watamelon.win
Did Nothing Wrong :watameloncool3d:
Joined: 2026-05-21 02:48:40
11 notes, 0 following, 0 followers
Reply to @MK2boogaloo@freebeerextremist.com
Tadano@tadano@mt.watamelon.win (2026-05-22 23:08:03)
@MK2boogaloo The clanker is giving results and they look good so far. Might commit after some extensive review.
---Attachments---
image: https://mt.watamelon.win/media/4969b397a26d8f022910a19b9cc6cf45394c9f8d2dcb9500d08c6109be2f63b5.png
image: https://mt.watamelon.win/media/1e630b99bc601cb77317b07eca0861f55db8db32018a53beab8875de004f1258.png
Reply to @tadano@mt.watamelon.win
Tadano@tadano@mt.watamelon.win (2026-05-22 22:59:28)
Prompt was fix this issue lol
Tadano@tadano@mt.watamelon.win (2026-05-22 22:59:11)
Gonna see how good this CLANKER is at Rust programming :cecihuh:
RE: https://mt.watamelon.win/objects/019e4bd7-9b8c-7683-9325-c6b55b8c455b
---Attachments---
image: https://mt.watamelon.win/media/0ead8e5ebd6ae92767a0c58c99c17fc7937814d3b2328889e3e0001ff4e3d88c.png
Reply to @p@fsebugoutzone.org
Tadano@tadano@mt.watamelon.win (2026-05-21 03:37:57)
@p @relaystalker @Wiz @mischievoustomato Not a Rust programmer so I just used Claude to get the following:
When Mitra receives a federated post containing remote media (images, videos, etc.), it doesn't serve those remote URLs directly to clients. Instead, it rewrites them to local proxy URLs that go through its own /api/media_proxy/ endpoint. This keeps client IP addresses private and allows Mitra to enforce content-type and size policies.
Configuration
>mitra_config/src/config.rs exposes a media_proxy_enabled flag (default: true). The server checks this at startup in mitra_api/src/server.rs line 55 and only registers the proxy routes when it's enabled.
URL Rewriting (at serialization time)
The rewriting happens inside ClientMediaServer in mitra_api/src/mastodon_api/media_server.rs. Its url_for() method is called whenever an attachment is serialized into an API response.
For local files it returns a direct filesystem-backed URL. For remote links it generates a signed proxy URL:
>The remote URL is hex-encoded.
>An Ed25519 signature is created over the URL bytes using the instance's secret key.
>The signature is hex-encoded.
>The final URL is: {instance_base}/api/media_proxy/{hex_encoded_url}?signature={hex_signature}
>This rewriting is transparent to API consumers. The attachment serialization in mitra_api/src/mastodon_api/media/types.rs line 71 calls media_server.url_for() for every attachment, and status responses in mitra_api/src/mastodon_api/statuses/types.rs line 188 use this path.
The Proxy Endpoint
>Route: GET /api/media_proxy/{url_encoded}?signature={signature}
>Handler: mitra_api/src/mastodon_api/media_proxy/views.rs line 26
When a client fetches a proxy URL, the handler:
>Verifies the Ed25519 signature against the encoded URL bytes using the same instance key. If the signature is invalid, it rejects the request. This prevents clients from crafting arbitrary proxy URLs to fetch anything.
>Calls stream_media() from apx_sdk (apx_sdk/src/fetch.rs li
Reply to @Wiz@tsundere.love
Tadano@tadano@mt.watamelon.win (2026-05-21 03:13:23)
@Wiz @relaystalker It's inconsistent like the PFP of @mischievoustomato doesn't load but yours does, and the other instances mentioned by name are similar in regrards to some stuff just not getting pulled for some reason. Could be my instance doing something wrong when requesting the image, I dunno
Reply to @tadano@mt.watamelon.win
Tadano@tadano@mt.watamelon.win (2026-05-21 02:36:38)
ALSO
>how to pull past posts from profiles quickly so I am not looking at a profile timeline with gaping holes
Tadano@tadano@mt.watamelon.win (2026-05-21 02:33:32)
Alright now to figure out the following issues:
>why instances like ryona.agency, tsundere.love, annihilation.social aren't loading images (all media is proxied by default i.e. not loaded from a local cache)
>why custom emoji reacts are not working despite cust emotes being usable in posting/being on the server
>if database shenanigans need to be done upgrading from 4.x to 5.3.0
>why federation is slow and how to get older posts in a timely manner (AI log analysis kept mentioning a duplicate key bug, unsure if hallucinatory or me being dumb :cirnoshrug:)
>why @relaystalker is STILL getting stuck on follow requesting with relay accounts
>how to get this instance to communicate with dedicated relays
>how to get tor/tor federation up with this docker setup
>how to federate over I2P
>how to temporarily get schwartzwelt up in a container without all the media so I can migrate all my followers from there to here
All shall be figured out in time as I relearn sysadmining :watamelonogey:
t. Instance running on Rocky Linux for the first time
Repost if you can! God willing this reaches as many Mitra sysadmins as possible because I don't think I can badger silverpill alone without being terribly rude/annoying :watamelonsweat:
---Attachments---
image: https://mt.watamelon.win/media/1e00183e82cb8e3d1434c5114efa6670b1788a50b1341cc603bdf86d3bee7608.png
image: https://mt.watamelon.win/media/35245a3b381a820da851cd964f5ef000f3658165c9906c0d07e4ff3d8f8b5fb3.png
Tadano@tadano@mt.watamelon.win (2026-05-20 13:07:04)
@silverpill hey should I have done some things before rawdogging this instance on 5.3.0 from 4.13?
Reply to @mischievoustomato@tsundere.love
Tadano@tadano@mt.watamelon.win (2026-05-20 13:05:45)
@mischievoustomato I think it would benefit Mitra immensely if there was an RPM package for it, either officially or via community. Perhaps I should make it.
Reply to @mischievoustomato@tsundere.love
Tadano@tadano@mt.watamelon.win (2026-05-20 12:43:30)
@mischievoustomato Got tired of Debian's nonstandard confs. Also wound up liking Fedora! I wish there was an RPM though...
Tadano@tadano@mt.watamelon.win (2026-05-20 07:19:15)
Now on Docker because this new server runs on Rocky Linux