transfem-org / Sharkey

🌎 A Sharkish microblogging platform 🚀
https://joinsharkey.org/
74 stars 19 forks source link

feat: Federation over proxy #211

Closed ch0ccyra1n closed 7 months ago

ch0ccyra1n commented 7 months ago

Summary

I think it would be great to add support for using a proxy for outgoing connections (i.e. federation). As I understand it, neither Misskey nor any of its forks actually allow you to do this as an admin, or if they do it's very poorly documented.

Purpose

My particular use-case for this is to federate with some fediverse instances which only exist on Tor. It's a concept I'm very passionate about because one of the downsides to the current way the fediverse works is that people are required to have a domain name in order to create a server. Allowing federation over Tor (or any proxy) would improve interoperability between more instances.

For examples of this in other fediverse software:

Mar0xy commented 7 months ago

This is out of scope for this project but misskey does support being hosted on tor via nginx proxy which also applies to sharkey see this japanese post about it: https://blog.moe233.net/posts/2246a551/

ch0ccyra1n commented 7 months ago

Interesting! I suppose it might be something which would be good to translate and bring over to the Sharkey documentation. Closing this issue since as you stated it's already possible.

Mar0xy commented 7 months ago

Interesting! I suppose it might be something which would be good to translate and bring over to the Sharkey documentation. Closing this issue since as you stated it's already possible.

Might be worth doing in the future.

dakkar commented 7 months ago

To be clear: that post describes how to serve a misskey instance over Tor. That's inbound connections: the rest of Tor talking to your *key.

If what you want is to proxy outbound connections (your *key instance talking to the rest of the Internet/Tor), https://github.com/transfem-org/Sharkey/blob/develop/.config/example.yml#L180-L192 these are the relevant bits of configuration

Yes, you don't get to say "use the proxy for this remote instance but not for this other one". If you need that, configure your proxy to route requests differently based on the remote host.