aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-05-05 13:47:13 -0500
committerGitHub <noreply@github.com>2024-05-05 13:47:13 -0500
commitbbbd09d8208f005fd2a976c025e888e84a3448ec (patch)
tree3804a25c0af9bf4bb21017c1f9abfec74e342abd /docs
parent37dea1f91371900dcfb4fae8f46c6f3a6dc98126 (diff)
parent2a5c671499ac7bb542d7373464ac4a57465d971d (diff)
downloadslskd-bbbd09d8208f005fd2a976c025e888e84a3448ec.tar.gz
Merge pull request #1100 from slskd/blacklist
[WIP] Add support for blacklist files
Diffstat (limited to 'docs')
-rw-r--r--docs/config.md28
1 files changed, 25 insertions, 3 deletions
diff --git a/docs/config.md b/docs/config.md
index 924e4de9..f81fe8c0 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -415,7 +415,7 @@ groups:
failures: 30
```
-## Blacklist
+## User Blacklist
A fourth built-in group, `blacklisted`, is used to disallow other users from various activities.
@@ -425,10 +425,12 @@ Blacklisted users are prevented from:
- Retrieving directory contents
- Enqueueing downloads
-Users can be blacklisted by adding their username to the `members` list. Additionally, users can be blacklisted by IP address, or range of addresses by adding a CIDR entry to the `cidrs` list.
+Users can be blacklisted by adding their username to the `members` list. Additionally, users can be blacklisted by IP address, or range of addresses by adding a CIDR entry to the `cidrs` list.
Users added to the blacklist will be blocked from enqueueing any new files. Any existing active or queued transfers will need to be cancelled manually.
+A managed blacklist file may also be used to achieve the same effects. Read more about this in the [Managed Blacklist](#managed-blacklist) section below.
+
**YAML**
```yaml
groups:
@@ -504,6 +506,27 @@ groups:
- bob
```
+## Managed Blacklist
+
+A managed blacklist (also called a blocklist) can be specified to disallow interaction with known undesireable actors. Users whose IP address metches an entry on this list are functionally the same as users added to the [User Blacklist](#user-blacklist) described above and are disallowed any interactions with shares or files.
+
+Blacklists/blocklists designed for use with other P2P applications (such as BitTorrent) are supported; specifically the P2P, DAT, and CIDR formats.
+
+When enabled, the specified file is validated by reading the first few lines of the file to automatically detect the format. If the file doesn't exist, can't be read, the format can't be detected, or if it contains any lines that don't match the format, the application will exit. Similarly, if the file changes while the application is running and there's an issue, the application will exit.
+
+Note that the contents of the blacklist are stored in memory to ensure performance, and this will increase the amount of memory used, potentially significantly if the blacklist is large.
+
+| Command-Line | Environment Variable | Description |
+| -------------------- | -------------------- | ------------------------------ |
+| `--enable-blacklist` | `BLACKLIST` | Enable the managed blacklist |
+| `--blacklist-file` | `BLACKLIST_FILE` | The path to the blacklist file |
+
+```yaml
+blacklist:
+ enabled: true
+ file: <path to file containing CIDRs to blacklist>
+```
+
# Chat Rooms and Private Messaging
## Auto-Joining Rooms
@@ -514,7 +537,6 @@ The list can be specified via command line (e.g. --rooms <room1> --rooms <room2>
Additionally, when the client is disconnected, any rooms that were joined at the time of the disconnect are rejoined upon reconnect, as long as the app hasn't been restarted in between.
-
| Command-Line | Environment Variable | Description |
| ------------- | ---------------------| ----------------------------------------|
| `--rooms` | `ROOMS` | A list of chat rooms to join on startup |