Giter VIP home page Giter VIP logo

pherephone's Introduction

Pherephone

A Pherephonon in Greek is someone who doesn't have his own voice and just repeats things other said. Pherephone is an ActivityPub relay. You set it up to follow a few accounts and it Announces everything they post.

How to run

Download the binary, edit config.ini and actors.json to your liking and run it. For the time being only the ActivityPub actor endpoint is supported. Usually the url of the user profile page will work. If it doesn't you will have to find it out using webfinger yourself. Here is an example on how to find my actor endpoint on fosstodon.

https://fosstodon.org/.well-known/webfinger?resource=acct:[email protected]

There's a -debug flag if you want more verbose output.

Actors configuration

{
    "writefreelyAndFriends" : {
        "summary": "a list of favorite writers",
        "follow": [
            "https://write.as/api/collections/blog",
            "https://writing.exchange/users/write_as"
        ]
    },
    "all_about_qwazix" : {
        "summary": "wanna stalk me?",
        "follow": [
            "https://pixelfed.social/users/qwazix",
            "https://print3d.social/users/qwazix",
            "https://mixt.qwazix.com/api/collections/qwazix",
            "https://fosstodon.org/api/collections/qwazix"
        ]
    }
}

Pherephone will create the accounts [email protected] and [email protected] and follow the users listed under each one. If you want to unfollow someone just remove any entry. Unfortunately json doesn't support comments so you'll have to delete it altogether. Mind the commas (there's no comma after the last entry)

Web server configuration and https

You will probably want to run it behind a reverse proxy with a Let's Encrypt certificate.

Here's the configuration for apache. You can find similar nginx configuration in the writefreely documentation

<VirtualHost *:443>
    ServerAdmin [email protected]
    ProxyRequests off
    DocumentRoot /var/www
    ProxyPreserveHost On

    ServerName pherephone.example.com

    ErrorLog /var/log/httpd/error.log
    CustomLog /var/log/httpd/access.log combined

    SSLEngine on
	SSLCertificateFile "/etc/letsencrypt/live/pherephone.example.com/fullchain.pem"
	SSLCertificateKeyFile "/etc/letsencrypt/live/pherephone.example.com/privkey.pem"

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel error

    <Location />
        ProxyPass http://localhost:8081/
        ProxyPassReverse http://localhost:8081/
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

General Configuration

There are four configuration values in Pherephone

[general]

baseURL = https://example.com
storage = storage ; can be relative or absolute path
userAgent = "pherephone"
announce_replies = false ; whether to boost replies of followers by default

The baseURL which is, erm, self-explanatory. Set it to your (sub)domain. storage which is the path where pherephone will save its data. Pherephone only uses json files in a directory structure to save its data. userAgent just sets the user agent string reported by the software announce_replies controls whether pherephone will boost everything the actors it follows post or only original posts.

pherephone's People

Contributors

thebaer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mrvdb forkkit

pherephone's Issues

failure to open actors.json should exit

on line 57 when an error is encounter opening the file actors.json we log a message and then the error:

  • Should the program not exit here?
  • Should the call to log be log.Error for the error message itself.

What is the license for this project?

I've added this project to the ActivityPub watchlist on the fediverse.party wiki, but I can't seem to find any license information. It's helpful to put a file called "LICENSE" or "COPYING" into the repo, that explains the terms under which the source code can be reused.

confusion about logging

There are two loggers, both with loglevel error enabled, their useage seems mixed without distinction. Should the logger printer be removed and just use log?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.