2 unstable releases
new 0.4.0 | Apr 28, 2024 |
---|---|
0.3.2 | Apr 15, 2024 |
0.3.1 |
|
#367 in Database interfaces
287 downloads per month
27KB
722 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
Prerequisites
A Dash installation for the installation script. A Rust installation of version 1.70 or higher.
Automatic Installation
This will compile and install automatically for you, but you need to set the log path to match your configuration in scripts/install.sh and scripts/uninstall.sh, otherwise you can still create/remove the directory yourself.
Note:
This will install the binary in '/usr/bin/'. If you cross-compile, you need to copy the binary to 'target/release/xmpp-http-upload' to use the automatic installation.
Run to install:
sudo sh install.sh install
If you want to uninstall:
sudo sh install.sh uninstall
Build
Note:
You don't need this if you use the installation script
Download the repository using git:
Enter the directory
cd xmpp-http-upload
Compile the server
cargo build --release
If you need to Cross-Compile.
Starting the service
Then you can(with systemd):
systemctl start xmpp-http-upload
Otherwise this:
/usr/bin/xmpp-http-upload
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
~6.5MB
~149K SLoC