diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..a4953c6 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Gervasio Marchand + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index c890658..47bb33f 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,25 @@ FakeRelay is a tool for Mastodon admins to load statuses into their instances. +More importantly, FakeRelay is NOT: + +* A relay. Even if from Mastodon's point of view it is a relay, if multiple instances are connected to it *it won't* share their posts. +* A scraper. FakeRelay receives a post's url and sends that to the registered instance. + ## Why is it needed? -If you're on a small or solo instance, following a hashtag doesn't provide a lot of value. This is because you'll only see stuff that's on the instance's federated timeline... but if you're the only user, the federated timeline is the same as your timeline. +If you're an admin of an instance, it's not really that easy to tell it "hey, index this post!". One thing any user can do is hit the `/api/v2/search` endpoint using `resolve=true`. That does accomplish the goal of fetching the post, but it's a synchronous call so it can take some seconds. -Discovering what to index isn't hard (I'm hitting big instances' `/tags/{interestingTag}.json` routes to fetch the content I want), but telling my instance that I want to bring over a toot isn't straightforward. +FakeRelay exposes an API to use the ActivityPub `/inbox` endpoint as if it were a relay. And then, the request is queued and eventually processed. -One thing any user can do is hit the `/api/v2/search` endpoint using `resolve=true`. That does accomplish the goal of fetching the status, but it's a synchronous call so it can take some seconds. +## What can I use it for? -This project uses the ActivityPub `/inbox` endpoint as if it were a relay. And then, the request is queued and eventually processed. +I use it to load content with #hashtags I care about. How? well, that's a separate project: [GetMoarFediverse](https://github.com/g3rv4/GetMoarFediverse). + +Other people have built other things on top of FakeRelay: + +* Abhinav Sarkar wrote [an article](https://notes.abhinavsarkar.net/2022/fake-relay) showing how you can achieve something similar to GetMoarFediverse in Python +* Raynor built [Fake Firehose](https://github.com/raynormast/fake-firehose), a tool that streams content from other instances and pushes that to FakeRelay. ## How can I use it? @@ -18,6 +28,8 @@ This project uses the ActivityPub `/inbox` endpoint as if it were a relay. And t Ask the operator for an api key. If you want an api key for fakerelay.gervas.io, I'm `@g3rv4@mastodonte.tech`. Send me a toot with your instance domain and I'll get you one. The API key will be associated with your domain. +I'm hosting this behind Cloudflare Workers. So if you have a lot of traffic, I'll ask you to run it on your infrastructure :) + ### Add the relay to your instance Your instance will receive traffic from this site as if it were a relay. But don't worry, it won't send anything except from the statuses you tell it to index.