Coder Social home page Coder Social logo

checksumdev / lumen Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 3.0 209 KB

Lumen is an astronomically fast ShareX uploader written in Rust using the Actix Web framework

Home Page: https://lumen.checksum.space

License: GNU Affero General Public License v3.0

Rust 96.99% Dockerfile 3.01%
actix-web sharex sharex-uploader

lumen's Introduction

Lumen ๐ŸŒ„

GitHub GitHub top language Static Badge Discord

Lumen is an astronomically fast ShareX uploader written in Rust using the Actix Web framework. It is designed to be lightweight and secure, providing a self-hosted solution for file uploads.

All uploads are encrypted with AES-256-GCM-SIV and only the uploader can decrypt the files.

Installation ๐Ÿš€

Note: Lumen is currently in development and may not be stable. Use at your own risk.

Building from source

# Clone the repository
git clone https://github.com/checksumdev/lumen.git
cd lumen

# Build the project
cargo build --release

# Configure .env
Rename .env.example to .env and change PUBLIC_URL if needed

# Run Lumen ๐ŸŒ„ (after you configured the .env file)
./target/release/lumen # or ./target/release/lumen.exe on Windows

# Lumen is now running on http://localhost:8080

Usage ๐Ÿ“

To use Lumen you first need to create an user with POST request to /register. Format for the post request is {"username": "USERNAME", "password": "PASSWORD"}. The server should return you the whole user object in the database including the API key which you need to save for later use.

To configure ShareX you need to get the configuration file and change its values to match your installation and user API key. An example ShareX configuration file is provided in the /examples folder: Lumen.sxcu. Download the file and open it with your favourite editor. Make sure to change values for requestUrl to match your domain and x-api-key with your user API key that you saved before, alongside that make sure to edit the end of deletionUrl field and replace API_KEY_HERE with your user API key

Nginx config โš™๏ธ

To use Lumen with nginx you can use configuration file provided in the /examples folder: nginx.conf.

Make sure to update the values in the configuration file to match your domain and Lumen installation.

# Nginx config for lumen
server {
    listen 80;
    server_name lumen.example.com; # Change lumen.example.com to your domain, should also change it in your sharex config

    # redirect http to https
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name lumen.example.com; # Change lumen.example.com to your domain

    # ssl
    ssl_certificate /etc/letsencrypt/live/lumen.example.com/fullchain.pem; # Change lumen.example.com to your domain
    ssl_certificate_key /etc/letsencrypt/live/lumen.example.com/privkey.pem; # Change lumen.example.com to your domain

    # proxy
    location / {
        proxy_pass http://127.0.0.1:8080;
        include /etc/nginx/proxy_params;
    }
}

Benchmarks ๐Ÿ“Š

These benchmarks were performed on a Ryzen 9 3900X with 32GB of RAM. Feel free to run the benchmarks yourself by running cargo bench in the project directory with a release server running.

WARNING: The benchmark will create many 1MB files, and will DELETE ALL uploads by the test user when it is finished.

Benchmark

Contributing ๐Ÿค

If you love what we're doing, star the repository! It helps us out a lot. If you want to contribute and have any major changes in mind, please open an issue first to discuss them. When making commits, please follow the Conventional Commits specification.

Star History Chart

Support ๐Ÿ’ฌ

If you need help with Lumen, feel free to join our Discord server or open an issue.

License ๐Ÿ“œ

Lumen is licensed under the Affero General Public License v3.0.

lumen's People

Contributors

at-heal avatar checksumdev avatar dependabot[bot] avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lumen's Issues

Considerations about doing the decryption server side

Hey, big fan of Lumen. Just looking at the implementation for encryption seems the goal is to prevent unencrypted files from being on disk, but the encryption/decryption process is still done on the server. Just wondering if there's any thoughts/interest in other ways of doing this as a malicious server could log the unencrypted files or decryption keys.

This may not be an issue for you I'm just curious if there's interest in exploring other more secure options :-)

Lumen roadmap

These are some features I see in the project eventually, if you have suggestions for more, let me know!

  • Basic frontend with first time setup functionality.
  • Multi-domain support
  • Other database engines such as MariaDB & Postgres.
  • Optional Zero Width Encoding to help lessen link size on supported platforms.
  • Documentation (codebase and wiki)

If you'd like to help out, open a PR! I'm always looking for more collaborators.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.