2019-07-04 20:50:46 +00:00
|
|
|
<img src="https://code.freedombone.net/bashrc/epicyon/raw/master/img/logo.png?raw=true" width=256/>
|
|
|
|
|
2019-07-04 21:20:26 +00:00
|
|
|
A minimal ActivityPub server.
|
2019-06-28 18:55:29 +00:00
|
|
|
|
2019-06-29 10:08:59 +00:00
|
|
|
Based on the specification: https://www.w3.org/TR/activitypub
|
2019-06-29 21:13:44 +00:00
|
|
|
|
2019-06-29 11:47:33 +00:00
|
|
|
Also: https://raw.githubusercontent.com/w3c/activitypub/gh-pages/activitypub-tutorial.txt
|
2019-06-29 10:08:59 +00:00
|
|
|
|
2019-07-05 20:32:21 +00:00
|
|
|
https://blog.dereferenced.org/what-is-ocap-and-why-should-i-care
|
|
|
|
|
2019-07-04 21:32:18 +00:00
|
|
|
This project is currently *pre alpha* and not recommended for any real world uses.
|
|
|
|
|
2019-07-04 21:21:10 +00:00
|
|
|
## Goals
|
2019-07-04 21:20:26 +00:00
|
|
|
|
|
|
|
* A minimal ActivityPub server, comparable to an email MTA.
|
2019-07-04 21:40:30 +00:00
|
|
|
* AGPLv3+
|
2019-07-04 21:20:26 +00:00
|
|
|
* Server-to-server and client-to-server protocols supported.
|
2019-07-04 21:32:18 +00:00
|
|
|
* Implemented in a common language (Python 3)
|
2019-07-04 21:20:26 +00:00
|
|
|
* Opt-in federation. Federate with a well-defined list of instances.
|
2019-07-04 22:11:56 +00:00
|
|
|
* Keyword filtering.
|
2019-07-06 09:07:24 +00:00
|
|
|
* Being able to define roles and skills, similar to the Pursuance project.
|
|
|
|
* Sharings collection, similar to the gnusocial sharings plugin
|
2019-07-04 21:20:26 +00:00
|
|
|
* Resistant to flooding, hellthreads, etc.
|
|
|
|
* Support content warnings, reporting and blocking.
|
|
|
|
* http signatures and basic auth.
|
|
|
|
* Compatible with http (onion addresses), https and dat.
|
|
|
|
* Minimal dependencies.
|
2019-07-05 20:32:21 +00:00
|
|
|
* Capabilities based security
|
2019-07-04 21:20:26 +00:00
|
|
|
* Data minimization principle. Configurable post expiry time.
|
|
|
|
* Commandline interface. If there's a GUI it should be a separate project.
|
|
|
|
* Designed for intermittent connectivity. Assume network disruptions.
|
|
|
|
* Suitable for single board computers.
|
|
|
|
|
2019-06-28 18:55:29 +00:00
|
|
|
## Install
|
|
|
|
|
|
|
|
``` bash
|
2019-07-04 20:42:05 +00:00
|
|
|
sudo pacman -S tor python-pip python-pysocks python-pycryptodome python-beautifulsoup4
|
2019-07-02 17:11:59 +00:00
|
|
|
sudo pip install commentjson
|
2019-07-04 20:44:03 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Running Tests
|
|
|
|
|
|
|
|
To run the unit tests:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --tests
|
|
|
|
```
|
|
|
|
|
|
|
|
To run the network tests. These simulate instances exchanging messages.
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --testsnetwork
|
|
|
|
```
|
2019-07-04 21:32:18 +00:00
|
|
|
|
2019-07-04 22:03:24 +00:00
|
|
|
## Viewing Public Posts
|
|
|
|
|
|
|
|
To view the public posts for a person:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --posts nickname@domain
|
|
|
|
```
|
|
|
|
|
|
|
|
If you want to view the raw json:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --postsraw nickname@domain
|
|
|
|
```
|
|
|
|
|
2019-07-04 22:54:28 +00:00
|
|
|
## Account Management
|
|
|
|
|
|
|
|
To add a new account:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --addaccount nickname@domain --password [yourpassword]
|
|
|
|
```
|
|
|
|
|
|
|
|
To remove an account (be careful!):
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --rmaccount nickname@domain
|
|
|
|
```
|
|
|
|
|
2019-07-05 09:53:51 +00:00
|
|
|
To change the password for an account:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --changepassword nickname@domain newpassword
|
|
|
|
```
|
|
|
|
|
2019-07-04 21:32:18 +00:00
|
|
|
## Running the Server
|
|
|
|
|
|
|
|
To run with defaults:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py
|
|
|
|
```
|
|
|
|
|
|
|
|
In a browser of choice (but not Tor browser) you can then navigate to:
|
|
|
|
|
|
|
|
``` text
|
|
|
|
http://localhost:8085/users/admin
|
|
|
|
```
|
|
|
|
|
|
|
|
If it's working then you should see the json actor for the default admin account.
|
|
|
|
|
|
|
|
For a more realistic installation you can run on a defined domain and port:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --domain [name] --port 8000 --https
|
|
|
|
```
|
|
|
|
|
|
|
|
You will need to proxy port 8000 through your web server and set up CA certificates as needed.
|
|
|
|
|
|
|
|
By default data will be stored in the directory in which you run the server, but you can also specify a directory:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
python3 epicyon.py --domain [name] --port 8000 --https --path [data directory]
|
|
|
|
```
|
2019-07-04 21:40:30 +00:00
|
|
|
|
|
|
|
By default the server will federate with any others. You can limit this to a well-defined list with the *--federate* option.
|
|
|
|
|
|
|
|
``` bash
|
2019-07-04 21:41:23 +00:00
|
|
|
python3 epicyon.py --domain [name] --port 8000 --https --federate domain1.net domain2.org domain3.co.uk
|
2019-07-04 21:40:30 +00:00
|
|
|
```
|