Crates.io | xmpp-http-upload |
lib.rs | xmpp-http-upload |
version | 0.5.1 |
source | src |
created_at | 2024-04-15 07:58:45.293576 |
updated_at | 2024-08-14 13:31:47.885131 |
description | A simple external http upload server for XMPP |
homepage | |
repository | https://gitlab.com/nyovaya/xmpp-http-upload |
max_upload_size | |
id | 1208995 |
size | 95,263 |
A light external HTTP upload server for XMPP user upload, 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
A Python installation of at least version 3.0. A Rust installation of version 1.70 or higher.
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.
Clone the repository using git:
Enter the directory
cd xmpp-http-upload
Run to install:
sudo ./install.py install
If you want to uninstall:
sudo ./install.py uninstall
Start the service:
systemctl start xmpp-http-upload
Stop the service:
systemctl stop xmpp-http-upload
Run as root:
/usr/bin/xmpp-http-upload -c [CONFIG FILE]
And to kill the process:
kill prep xmpp-http-upload
This depends on your XMPP server software and should be looked up in the corresponding documentation.
See the following website, how the configuration works in Prosody.
Use the following lines in your Ejabberd config file:
mod_http_upload:
put_url: "https://your-upload-url.here"
external_secret: "secret"
Dont forget to properly remap the url in your reverse proxy, otherwise you might run into 404/403 requests. See e.g. mod_proxy under proxy.header.