在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):aaronpk/Nautilus开源软件地址(OpenSource Url):https://github.com/aaronpk/Nautilus开源编程语言(OpenSource Language):PHP 97.4%开源软件介绍(OpenSource Introduction):NautilusThis project is meant to run as a standalone service to deliver posts from your own website to ActivityPub followers. You can run your own website at your own domain, and this service can handle the ActivityPub-specific pieces needed to let people follow your own website from Mastodon or other compatible services. SetupThese instructions assume you've deployed this proxy service to Create a user account in this service
Fetch the JSON profile from this service to serve on your domain
Save that file on your own website in a file named:
Save the below as a file named:
In order for the permalinks of your posts to also live on your domain, you'll need to create an HTTP redirect rule from your server to this service. In nginx, you can create a rewrite rule such as this:
Your posts will be identified with a URL on your own domain this way, so that you continue to own the permalinks. This rewrite is required in order for Mastodon and other servers to be able to fetch the JSON version of your posts. RunningThis project uses the Laravel framework. Please refer to the Laravel Configuration Guide for more details. You'll need to copy Once your queue and database are configured, you can run the worker in the background via:
UsageFollowingOnce your domain is configured to delegate the ActivityPub profile bits to this service, you can now be followed by people on Mastodon. They will be able to search for DeliveryTo create a post to deliver to all your followers, you'll need to create a token that you can use to tell this service to deliver a post. From the command line, run:
This will output a new token you can use in a request. To create a post and deliver it to your followers, send a POST request with the token to this service's post creation endpoint. For example: $ch = curl_init('https://proxy.example.com/yourusername/micropub');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer xxxxxxxxxxxxxxxxxxx'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'h' => 'entry',
'content' => 'The content of your post'
]);
curl_exec($ch); The background worker will deliver the post to all of your followers. TodoThis is currently a pretty barebones ActivityPub implementation. There are still a few things needed to turn this into a full ActivityPub proxy service.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论