Add static files

This commit is contained in:
Anthony Wang 2023-01-18 01:19:53 +00:00
parent c2b532982c
commit 80e5041182
Signed by: a
GPG key ID: 42A5B952E6DD8D38
5 changed files with 75 additions and 1 deletions

.well-known/webfinger Normal file
View file

@ -0,0 +1,10 @@
"subject": "",
"links": [
"rel": "self",
"type": "application/activity+json",
"href": ""

View file

@ -1,3 +1,35 @@
# fuwuqi
A useless C2S ActivityPub server
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!
If that sounds like a world of pain, close this webpage now... OK, got that out of the way. Time for some fun!
## Configuration
First, clone this repo on your server.
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
Rename `users/test.jsonld` to your username and pop it open in your favorite text editor. You should change `` 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.
That wasn't so bad, was it? (sobbing sounds)
## Usage
Alright, time for the real deal. Start up `python` 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]( and `curl`ing some homemade JSON. That's rough, buddy.
Like and subscribe and enjoy your new "extremely hardcore" ActivityPub server!!! 🎉😎🚀🙃🥳
## Resources

10 Normal file
View file

@ -0,0 +1,10 @@
from http.server import SimpleHTTPRequestHandler, HTTPServer
class fuwuqi(SimpleHTTPRequestHandler):
def do_POST(self):
self.send_header('Content-type', 'text/html')
HTTPServer(('localhost', 4200), fuwuqi).serve_forever()

users/test.jsonld Normal file
View file

@ -0,0 +1,22 @@
"@context": [
"id": "",
"type": "Person",
"preferredUsername": "test",
"name": "Billiam Wender",
"inbox": "",
"outbox": "",
"icon": {
"type": "Image",
"mediaType": "image/png",
"url": ""
"publicKey": {
"id": "",
"owner": "",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnPn6SRQ1JTwqFMFJq7Bg\nxMW/4V/HYSjHPbtKL/3jwXOTmOLUz4wr4Ib1IwiKpsguz0uyX1Ljbe3qQzqaCZu5\nhdoGo+uJsanz6yAoLYwETfIFIjqQr3FoIGQxYJDELkhSO8htbOKKoRiVKsjD5x4Q\ncEkZkLAaef8WVh08sEqE3fC4uLmOlSavycbMLmah9UdhljFcaVSQ7qox9HFvKF2e\ni4BmN2WdMGZ8JN20nc0OxoZpBpMArRqF0krjIkhA5/9CvIZEULPQChYL6AcmLS0j\n/yTxE82eFMBBvyeg8ICMRzcbCoN+hVnv3cb/7+BwNdoQjZqt0RG/hhbpc8RKt+YO\n9QIDAQAB\n-----END PUBLIC KEY-----\n"

users/test.png Normal file

Binary file not shown.


Width:  |  Height:  |  Size: 24 KiB