Compare commits

..

8 Commits

Author SHA1 Message Date
mguschin
9673cd78a3 Fix prosody config. 2026-04-29 21:56:24 +03:00
mguschin
93f32ec3be Fix sligram config. 2026-04-29 21:53:14 +03:00
mguschin
eddb4b3531 Fix prosody conf. 2026-04-29 21:45:21 +03:00
mguschin
bb7596ffdd Fix prosody config. 2026-04-29 21:42:55 +03:00
mguschin
034a12c0fd Fix docker compose. 2026-04-29 21:38:37 +03:00
mguschin
36751f5229 Fix docker compose. 2026-04-29 20:59:12 +03:00
mguschin
e207af3ca6 Fix sligram image path. 2026-04-29 20:22:35 +03:00
mguschin
6feff1c7e6 Tg bridge. 2026-04-29 20:09:17 +03:00
4 changed files with 49 additions and 0 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
.env
data/prosody/certs
web-sites
logs

View File

@@ -4,6 +4,7 @@ FROM debian:bookworm-slim
RUN apt-get update --fix-missing && \
apt-get install -y --no-install-recommends \
prosody \
prosody-modules \
lua-dbi-mysql \
lua-sec \
lua-unbound \

View File

@@ -3,6 +3,8 @@
admins = { "admin@guschin.info", "admin@xmpp.guschin.info" }
plugin_paths = { "/usr/lib/prosody/modules" }
modules_enabled = {
-- Generally required
"roster";
@@ -25,6 +27,10 @@ modules_enabled = {
-- Admin interface
"admin_adhoc";
-- Gateway support
"privilege";
"http_file_share";
};
modules_disabled = {
@@ -53,6 +59,7 @@ sql = {
c2s_ports = { 5222 }
s2s_ports = { 5269 }
component_ports = { 5347 }
component_interface = "0.0.0.0"
http_ports = { 5280 }
https_ports = { 5281 }
@@ -75,6 +82,17 @@ VirtualHost "guschin.info"
key = "/etc/prosody/certs/guschin.info.key";
certificate = "/etc/prosody/certs/guschin.info.crt";
}
privileged_entities = {
["telegram.guschin.info"] = {
roster = "both"; -- auto add/remove Telegram contacts from roster
message = "outgoing"; -- reflect messages sent via official Telegram apps
iq = {
["http://jabber.org/protocol/pubsub"] = "both"; -- PEP bookmarks
["http://jabber.org/protocol/pubsub#owner"] = "set"; -- message display sync
["urn:xmpp:http:upload:0"] = "get"; -- upload on behalf of users
};
};
}
-- Secondary virtual host (user@xmpp.guschin.info)
VirtualHost "xmpp.guschin.info"
@@ -87,3 +105,11 @@ VirtualHost "xmpp.guschin.info"
Component "muc.guschin.info" "muc"
modules_enabled = { "muc_mam" }
storage = "sql"
-- HTTP file upload (XEP-0363) — used by slidgram for Telegram→XMPP attachments
Component "upload.guschin.info" "http_file_share"
http_file_share_access = { "telegram.guschin.info" }
-- Telegram gateway (slidgram)
Component "telegram.guschin.info"
component_secret = os.getenv("SLIDGRAM_COMPONENT_SECRET")

View File

@@ -12,6 +12,7 @@ services:
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
SLIDGRAM_COMPONENT_SECRET: ${SLIDGRAM_COMPONENT_SECRET}
extra_hosts:
- "host.docker.internal:172.17.0.1"
ports:
@@ -38,6 +39,25 @@ services:
networks:
- prosody
slidgram:
image: codeberg.org/slidge/slidgram:latest
container_name: slidgram
user: "100:102"
environment:
SLIDGE_JID: telegram.guschin.info
SLIDGE_SECRET: ${SLIDGRAM_COMPONENT_SECRET}
SLIDGE_SERVER: prosody-xmpp
SLIDGE_PORT: 5347
SLIDGE_UPLOAD_SERVICE: upload.guschin.info
volumes:
- ./data/slidgram:/var/lib/slidge
restart: unless-stopped
depends_on:
prosody:
condition: service_healthy
networks:
- prosody
networks:
prosody:
driver: bridge