diff --git a/docs/commands.md b/docs/commands.md index 3749b83..c6a58de 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -92,27 +92,6 @@ Delete a user. activityrelay user delete -### List Tokens - -List all API tokens for a user. - - activityrelay user list-tokens - - -### Create Token - -Generate a new API token for a user. - - activityrelay user create-token - - -### Delete Token - -Delete an API token. - - activityrelay user delete-token - - ## 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 --reason --note + activityrelay ban add --reason --note --software --fetch-nodeinfo -### Unban +### Remove -Remove an instance from the ban list. +Remove a ban. - activityrelay instance unban + activityrelay ban remove --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 --note - - -## 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] --reason --note - - -### 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] - - -### 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 --note + activityrelay ban update --reason --note --software diff --git a/docs/configuration.md b/docs/configuration.md index bb61619..75b65f2 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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 diff --git a/relay/cli/instance_ban.py b/relay/cli/instance_ban.py index 118d133..0f159f2 100644 --- a/relay/cli/instance_ban.py +++ b/relay/cli/instance_ban.py @@ -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) diff --git a/relay/cli/software_ban.py b/relay/cli/software_ban.py index 1f9fab9..c5b1eec 100644 --- a/relay/cli/software_ban.py +++ b/relay/cli/software_ban.py @@ -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) diff --git a/relay/state.py b/relay/state.py index d01fc1c..269aa61 100644 --- a/relay/state.py +++ b/relay/state.py @@ -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,