A useless C2S ActivityPub server
Find a file
Anthony Wang 31a28b64fb
idk 2.0
2023-01-18 06:27:17 +00:00
.well-known Add static files 2023-01-18 01:19:53 +00:00
users Clean up repo 2023-01-18 06:25:31 +00:00
accept.jsonld Add latest working code 2023-01-18 06:23:36 +00:00
client.py Add latest working code 2023-01-18 06:23:36 +00:00
create.jsonld Add latest working code 2023-01-18 06:23:36 +00:00
follow.jsonld Add latest working code 2023-01-18 06:23:36 +00:00
LICENSE Initial commit 2023-01-18 00:18:22 +00:00
README.md idk 2.0 2023-01-18 06:27:17 +00:00
server.py Clean up repo 2023-01-18 06:25:31 +00:00

fuwuqi

Fuwuqi (fúwùqì or 服务器 means "server" in Chinese) is a useless C2S ActivityPub server for "extremely hardcore" ActivityPub enthusiasts. Craft your own exquisite WebFinger response! Customize your actor object exactly like you want! Hack and extend the 100-line Python server code! 100% guarenteed™ to federate with Mastodon!

Configuration

First, clone this repo on your server and your client device.

Now, generate an RSA keypair on your client device:

openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -outform PEM -pubout -out public.pem

On the server, rename users/test.jsonld to your username and pop it open in your favorite text editor. You should change 0.exozy.me to match your server's domain name, test to your username, and the publicKeyPem field to the public key you just generated.

Onward! Now open .well-known/webfinger in your editor, and modify it similarly. Finally, open server.py and update the domain, obviously.

That wasn't so bad, was it? (sobbing sounds)

Usage

Alright, time for the real deal. Start up python server.py on your server. If you want to customize the port or whatever, just change the source code.

Now on your client device, open up your favorite C2S ActivityPub client... oh wait... there aren't any! Welp, you'll just have to settle for reading the AP spec, writing some homemade JSON, and figuring out how python client.py works. That's rough, buddy. You'll have to learn how to manually write Notes, manually accept follow requests, and more! You can find some examples in this repo. HTTP signatures are generated client-side, for no good reason other than it works. If you want to view your unread messages, just curl your inbox. Easy as that. (screaming in pain sounds)

Enjoy your new "extremely hardcore" ActivityPub server!!! 🎉😎🚀🙃🥳

Resources