initial
This commit is contained in:
parent
b5f4169aec
commit
c8ff2e9922
2
Dockerfile
Normal file
2
Dockerfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
FROM matrixdotorg/synapse:latest
|
||||||
|
RUN pip install --no-cache-dir synapse-http-antispam
|
78
README.md
78
README.md
@ -1,9 +1,81 @@
|
|||||||
# template_repository
|
# Synapse Docker Image mit integriertem HTTP Antispam Modul
|
||||||
|
|
||||||
|
> 📝 Diese Dokumentation ergänzt den Blogbeitrag
|
||||||
|
> [🔐 Matrix absichern mit Draupnir Antispam Modul (Blog)](https://www.cleveradmin.de/blog/2025/05/matrix-absichern-mit-draupnir-antispam-modul/)
|
||||||
|
> und bietet eine praktische Umsetzung in Form eines vorgefertigten Docker-Images mit integriertem Antispam-Modul für Synapse.
|
||||||
|
|
||||||
|
Dieses Repository stellt ein angepasstes Docker-Image für den Matrix Synapse Server bereit, welches das Modul [synapse-http-antispam](https://github.com/maunium/synapse-http-antispam) bereits enthält. Es richtet sich an Administratoren, die Draupnir als externen Spamfilter für ihre Synapse-Instanz nutzen möchten – besonders in Docker-Umgebungen.
|
||||||
|
|
||||||
Wichtig: Link für Lizenz anpassen.
|
## 📦 Docker Image
|
||||||
|
|
||||||
|
Das Image basiert auf `matrixdotorg/synapse:latest` und wird automatisch um das HTTP Antispam Modul erweitert. Es kann direkt genutzt oder als Basis für ein eigenes Compose-Setup verwendet werden.
|
||||||
|
|
||||||
|
### Verfügbare Tags
|
||||||
|
|
||||||
|
- `repo.techniverse.net/docker-hosted/custom-synapse:latest-antispam` – immer die aktuellste Version
|
||||||
|
- `repo.techniverse.net/docker-hosted/custom-synapse:v1.130.0-antispam` – spezifische Synapse-Version mit Modul
|
||||||
|
|
||||||
|
### Beispiel: docker-compose.yml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
synapse-antispam:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
image: custom-synapse:latest-antispam
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternativ kannst du direkt ein vorgefertigtes Image mit Tag verwenden, z. B.:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
image: repo.techniverse.net/docker-hosted/custom-synapse:v1.130.0-antispam
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔧 Konfiguration in homeserver.yaml
|
||||||
|
|
||||||
|
Damit das Modul korrekt funktioniert, muss folgende Konfiguration in `homeserver.yaml` ergänzt werden:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
modules:
|
||||||
|
- module: synapse_http_antispam.HTTPAntispam
|
||||||
|
config:
|
||||||
|
base_url: http://matrix-draupnir:8082/api/1/spam_check
|
||||||
|
authorization: '8EEGpJGVsR2yHmXaA9r74SwcmijLpQmraRm6HuivhG8in5KJ8H'
|
||||||
|
enabled_callbacks:
|
||||||
|
- check_event_for_spam
|
||||||
|
- user_may_invite
|
||||||
|
- user_may_join_room
|
||||||
|
fail_open:
|
||||||
|
check_event_for_spam: true
|
||||||
|
user_may_invite: false
|
||||||
|
user_may_join_room: false
|
||||||
|
async:
|
||||||
|
check_event_for_spam: true
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🧩 Funktionsweise des Moduls
|
||||||
|
|
||||||
|
Das Modul leitet bestimmte Ereignisse an einen externen HTTP-Dienst weiter – in diesem Fall Draupnir – um dort zu prüfen, ob eine Aktion als Spam gewertet werden soll. Es kann Nachrichten, Einladungen und Raumbeitritte blockieren, bevor sie überhaupt ausgeführt werden.
|
||||||
|
|
||||||
|
**Verfügbare Prüfungen (Callbacks):**
|
||||||
|
- `check_event_for_spam` – prüft Nachrichten und Aktionen
|
||||||
|
- `user_may_invite` – prüft Einladungserlaubnis
|
||||||
|
- `user_may_join_room` – prüft Beitrittsberechtigung
|
||||||
|
|
||||||
|
**Weitere Optionen:**
|
||||||
|
- `fail_open` – legt fest, ob bei Ausfall von Draupnir Aktionen erlaubt bleiben
|
||||||
|
- `async` – aktiviert die asynchrone Prüfung für bessere Performance
|
||||||
|
|
||||||
|
## 🔗 Weiterführende Links
|
||||||
|
|
||||||
|
- [🔐 Matrix absichern mit Draupnir Antispam Modul (Blog)](https://www.cleveradmin.de/blog/2025/05/matrix-absichern-mit-draupnir-antispam-modul/)
|
||||||
|
- [📚 Draupnir-Dokumentation](https://the-draupnir-project.github.io/draupnir-documentation/)
|
||||||
|
- [🧰 synapse-http-antispam (GitHub)](https://github.com/maunium/synapse-http-antispam)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Hinweis: Dieses Repository enthält keine Quelltexte des Moduls selbst, sondern dokumentiert nur die Verwendung des vorkonfigurierten Docker-Images.
|
||||||
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@ -11,5 +83,5 @@ Wichtig: Link für Lizenz anpassen.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://assets.techniverse.net/f1/logos/small/license.png" alt="License" width="15" height="15"> <a href="./template_repository/src/branch/main/LICENSE">License</a> | <img src="https://assets.techniverse.net/f1/logos/small/matrix2.svg" alt="Matrix" width="15" height="15"> <a href="https://matrix.to/#/#community:techniverse.net">Matrix</a> | <img src="https://assets.techniverse.net/f1/logos/small/mastodon2.svg" alt="Matrix" width="15" height="15"> <a href="https://social.techniverse.net/@donnerwolke">Mastodon</a>
|
<img src="https://assets.techniverse.net/f1/logos/small/license.png" alt="License" width="15" height="15"> <a href="./synapse-antispam/src/branch/main/LICENSE">License</a> | <img src="https://assets.techniverse.net/f1/logos/small/matrix2.svg" alt="Matrix" width="15" height="15"> <a href="https://matrix.to/#/#community:techniverse.net">Matrix</a> | <img src="https://assets.techniverse.net/f1/logos/small/mastodon2.svg" alt="Matrix" width="15" height="15"> <a href="https://social.techniverse.net/@donnerwolke">Mastodon</a>
|
||||||
</p>
|
</p>
|
Loading…
x
Reference in New Issue
Block a user