Implement TLS support for WebSocket connections in yourchat2. Updated main.rs to handle secure WebSocket connections based on environment variables. Enhanced install-systemd.sh to include a template for environment configuration. Updated README to document new TLS-related environment variables and installation instructions.
This commit is contained in:
@@ -33,6 +33,9 @@ Der Server lauscht danach standardmaessig auf:
|
||||
- `CHAT_WS_ADDR` (default: `0.0.0.0:1235`)
|
||||
- `CHAT_TCP_ADDR` (default: `127.0.0.1:1236`)
|
||||
- `CHAT_UNIX_SOCKET` (optional, z. B. `/run/yourchat2/yourchat2.sock`)
|
||||
- `CHAT_WS_TLS` (optional, `true` fuer direktes WSS auf `CHAT_WS_ADDR`)
|
||||
- `CHAT_TLS_CERT_PATH` (Pfad zum PEM-Zertifikat fuer WSS)
|
||||
- `CHAT_TLS_KEY_PATH` (Pfad zum PEM-Private-Key fuer WSS)
|
||||
- `CHAT_ALLOWED_USERS` (optional, CSV-Liste erlaubter Usernamen, z. B. `alice,bob,carol`)
|
||||
- `CHAT_DB_URL` (optional, PostgreSQL-Connection-String fuer Community-/Chat-User-Checks)
|
||||
- `SECRET_KEY` (benoetigt fuer Entschluesselung verschluesselter Birthdate-Werte aus der DB)
|
||||
@@ -116,6 +119,7 @@ Zusaetzlich gibt es ein Installationsskript `install-systemd.sh`, das:
|
||||
- Arbeitsverzeichnis `/var/lib/yourchat2` erstellt
|
||||
- Environment-Datei unter `/etc/yourchat2/yourchat2.env` anlegt (falls nicht vorhanden)
|
||||
- Service aktiviert und startet
|
||||
- Standard-Config aus `config/yourchat2.env.example` nach `/etc/yourchat2/yourchat2.env` uebernimmt (falls noch nicht vorhanden)
|
||||
|
||||
Installation:
|
||||
|
||||
@@ -132,3 +136,7 @@ Wichtige Variablen fuer produktiven Betrieb:
|
||||
|
||||
- `CHAT_DB_URL`
|
||||
- `SECRET_KEY`
|
||||
|
||||
Standard-Config-Template im Projekt:
|
||||
|
||||
- `config/yourchat2.env.example`
|
||||
|
||||
Reference in New Issue
Block a user