#http #xmpp

app xmpp-http-upload

A simple external http upload server for XMPP

3 unstable releases

0.4.1 May 19, 2024
0.4.0 Apr 28, 2024
0.3.2 Apr 15, 2024
0.3.1 Apr 15, 2024

#489 in Database interfaces

Download history 245/week @ 2024-04-10 42/week @ 2024-04-17 107/week @ 2024-04-24 19/week @ 2024-05-01 113/week @ 2024-05-15 17/week @ 2024-05-22

217 downloads per month

MPL-2.0 license

33KB
907 lines

About

A small external http upload server compatible with prosody and ejabberd configurations. It currently covers the following features:

  • Block mime types
  • Remove files when they exceed a time delta
  • Logging traffic
  • Saves metadata in a small database (CBOR serialized table)
  • Switch between implementation versions
  • Run the server as an own daemon

Prerequisites

A Python installation of at least version 3.0. A Rust installation of version 1.70 or higher.

Automatic Installation

This will compile and install automatically system-wide for you, but you need to set the log path to match your configuration in install.py, otherwise you can still create/remove the directory yourself.

Note:
If you cross-compile, you need to set the COMPILE_TARGET with the build target of rustc in the script to use the automatic installation. See Cross-Compile.

Download the repository using git:

git clone https://gitlab.com/nyovaya/xmpp-http-upload

Enter the directory

cd xmpp-http-upload

Run to install:

sudo ./install.py install

If you want to uninstall:

sudo ./install.py uninstall

Starting the service

Then you can run (with systemd):

systemctl start xmpp-http-upload

Otherwise this (as root):

/usr/bin/xmpp-http-upload -c [CONFIG FILE]

And to exit again:

kill prep xmpp-http-upload

XMPP Setup

This depends on your XMPP server software and should be looked up in the corresponding documentation.

Prosody

See the following website, how the configuration works in Prosody.

Ejabberd

Use the following lines in your Ejabberd config file:

mod_http_upload:
  put_url: "https://your-upload-url.here"
  external_secret: "secret"

Dependencies

~6MB
~138K SLoC