mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2025-04-20 01:26:43 +00:00
update docs
This commit is contained in:
parent
ef7109e321
commit
2e9a8a99e5
5 changed files with 23 additions and 88 deletions
|
@ -92,27 +92,6 @@ Delete a user.
|
|||
activityrelay user delete <username>
|
||||
|
||||
|
||||
### List Tokens
|
||||
|
||||
List all API tokens for a user.
|
||||
|
||||
activityrelay user list-tokens <username>
|
||||
|
||||
|
||||
### Create Token
|
||||
|
||||
Generate a new API token for a user.
|
||||
|
||||
activityrelay user create-token <username>
|
||||
|
||||
|
||||
### Delete Token
|
||||
|
||||
Delete an API token.
|
||||
|
||||
activityrelay user delete-token <code>
|
||||
|
||||
|
||||
## Inbox
|
||||
|
||||
Manage the list of subscribed instances.
|
||||
|
@ -193,81 +172,37 @@ Add all current inboxes to the whitelist.
|
|||
activityrelay whitelist import
|
||||
|
||||
|
||||
## Instance
|
||||
## Ban
|
||||
|
||||
Manage the instance ban list.
|
||||
Manage the domain and software bans.
|
||||
|
||||
|
||||
### List
|
||||
|
||||
List the currently banned instances.
|
||||
List the current bans. Use `--only-domains` to display just the banned domains and `--only-software`
|
||||
to just list the banned software. Specifying both will result in an error. `--expanded-format` will
|
||||
put the reason on the next line.
|
||||
|
||||
activityrelay instance list
|
||||
activityrelay instance list --only-domains --only-software --expanded-format
|
||||
|
||||
|
||||
### Ban
|
||||
### Add
|
||||
|
||||
Add an instance to the ban list. If the instance is currently subscribed, it will be removed from
|
||||
the inbox list.
|
||||
Add a domain or software to the ban list. If the instance is currently subscribed, it will be removed
|
||||
from the relay.
|
||||
|
||||
activityrelay instance ban <domain> --reason <text> --note <text>
|
||||
activityrelay ban add <name> --reason <text> --note <text> --software --fetch-nodeinfo
|
||||
|
||||
|
||||
### Unban
|
||||
### Remove
|
||||
|
||||
Remove an instance from the ban list.
|
||||
Remove a ban.
|
||||
|
||||
activityrelay instance unban <domain>
|
||||
activityrelay ban remove <name> --software
|
||||
|
||||
|
||||
### Update
|
||||
|
||||
Update the ban reason or note for an instance ban. Either `--reason` and/or `--note` must be
|
||||
specified.
|
||||
Update the reason or note for a ban. Either `--reason` and/or `--note` must be specified.
|
||||
|
||||
activityrelay instance update bad.example.com --reason <text> --note <text>
|
||||
|
||||
|
||||
## Software
|
||||
|
||||
Manage the software ban list. To get the correct name, check the software's nodeinfo endpoint.
|
||||
You can find it at `nodeinfo['software']['name']`.
|
||||
|
||||
|
||||
### List
|
||||
|
||||
List the currently banned software.
|
||||
|
||||
activityrelay software list
|
||||
|
||||
|
||||
### Ban
|
||||
|
||||
Add a software name to the ban list.
|
||||
|
||||
If `-f` or `--fetch-nodeinfo` is set, treat the name as a domain and try to fetch the software
|
||||
name via nodeinfo.
|
||||
|
||||
If the name is `RELAYS` (case-sensitive), add all known relay software names to the list.
|
||||
|
||||
activityrelay software ban [-f/--fetch-nodeinfo] <name, domain, or RELAYS> --reason <text> --note <text>
|
||||
|
||||
|
||||
### Unban
|
||||
|
||||
Remove a software name from the ban list.
|
||||
|
||||
If `-f` or `--fetch-nodeinfo` is set, treat the name as a domain and try to fetch the software
|
||||
name via nodeinfo.
|
||||
|
||||
If the name is `RELAYS` (case-sensitive), remove all known relay software names from the list.
|
||||
|
||||
activityrelay software unban [-f/--fetch-nodeinfo] <name, domain, or RELAYS>
|
||||
|
||||
|
||||
### Update
|
||||
|
||||
Update the ban reason or note for a software ban. Either `--reason` and/or `--note` must be
|
||||
specified.
|
||||
|
||||
activityrelay software update relay.example.com --reason <text> --note <text>
|
||||
activityrelay ban update <name> --reason <text> --note <text> --software
|
||||
|
|
|
@ -16,8 +16,7 @@ Hostname the relay will be hosted on.
|
|||
#### Listener
|
||||
|
||||
The address and port the relay will listen on. If the reverse proxy (nginx, apache, caddy, etc)
|
||||
is running on the same host, it is recommended to change `listen` to `localhost` if the reverse
|
||||
proxy is on the same host.
|
||||
is running on the same host, it is recommended to change `listen` to `localhost`.
|
||||
|
||||
listen: 0.0.0.0
|
||||
port: 8080
|
||||
|
@ -40,14 +39,14 @@ SQL database backend to use. Valid values are `sqlite` or `postgres`.
|
|||
|
||||
#### Cache type
|
||||
|
||||
Cache backend to use. Valid values are `database` or `redis`
|
||||
Cache backend to use. Valid values are `database` or `redis`.
|
||||
|
||||
cache_type: database
|
||||
|
||||
|
||||
#### Sqlite File Path
|
||||
|
||||
Path to the sqlite database file. If the path is not absolute, it is relative to the config file.
|
||||
Path to the sqlite database file. If the path is not absolute, it is relative to the config file
|
||||
directory.
|
||||
|
||||
sqlite_path: relay.jsonld
|
||||
|
@ -102,14 +101,14 @@ Password for the specified user.
|
|||
|
||||
Hostname, IP address, or unix socket the server is hosted on.
|
||||
|
||||
host: /var/run/postgresql
|
||||
host: localhost
|
||||
|
||||
|
||||
#### Port
|
||||
|
||||
Port number the server is listening on.
|
||||
|
||||
port: 5432
|
||||
port: 6379
|
||||
|
||||
|
||||
#### Username
|
||||
|
|
|
@ -6,7 +6,7 @@ from ..state import State
|
|||
|
||||
|
||||
# remove this in 0.4.0
|
||||
@cli.group("instance")
|
||||
@cli.group("instance", hidden = True)
|
||||
def cli_instance() -> None:
|
||||
"""
|
||||
Manage instance bans (deprecated)
|
||||
|
|
|
@ -7,7 +7,7 @@ from ..state import State
|
|||
|
||||
|
||||
# remove this in 0.4.0
|
||||
@cli.group("software")
|
||||
@cli.group("software", hidden = True)
|
||||
def cli_software() -> None:
|
||||
"""
|
||||
Manage software bans (deprecated)
|
||||
|
|
|
@ -112,6 +112,7 @@ class State:
|
|||
return
|
||||
|
||||
from .views import ROUTES, middleware as mw
|
||||
|
||||
logging.info(
|
||||
"Starting webserver at %s (%s:%d)",
|
||||
self.config.domain,
|
||||
|
|
Loading…
Reference in a new issue