No description
Find a file
2024-06-05 13:47:16 +02:00
assets Add privacy policy and accessibility 2023-11-19 16:44:42 +01:00
migrations Simplify to sqlite only 2024-06-05 13:47:16 +02:00
src Simplify to sqlite only 2024-06-05 13:47:16 +02:00
templates Add privacy policy and accessibility 2023-11-19 16:44:42 +01:00
.gitignore Simplify to sqlite only 2024-06-05 13:47:16 +02:00
Cargo.toml Simplify to sqlite only 2024-06-05 13:47:16 +02:00
config.toml.sample Simplify to sqlite only 2024-06-05 13:47:16 +02:00
Containerfile Simplify to sqlite only 2024-06-05 13:47:16 +02:00
lang.json Add privacy policy and accessibility 2023-11-19 16:44:42 +01:00
LICENSE Initial commit, version 1.0.0 2019-09-22 20:43:44 +02:00
README.md Remove screenshots; update instance url 2023-11-17 22:43:02 +01:00

lyx (Fork of rs-short)

Link shortener in Rust.

Developed to be as minimal and lightweight as possible.

Powered by the Actix framework using (server-side) Askama templates.

  • Around 1000 lines of code, including 20% of comments
  • Consumes between 5MB and 20MB of RAM
  • No JS, no CSS framework
  • No tracking features, user IPs are not saved in database
  • No unsafe block
  • Compiles on Rust stable

Features:

  • Easily customizable assets, contact details and hoster information
  • Robust caching features to serve content even with database locks
  • Localization (available in French, English, Croatian and Occitan, please translate!)
  • Allows shortcut deletion by the user via administration links
  • Allows marking a shortcut as "phishing", which displays a awareness-raising message to victims
  • Blocks URL with regexes, includes a default blocklist

Official instance: https://l.lyx.sh/ (Shortcuts work on root domain)

Running an instance

First, you must install Cargo and the latest stable version of Rust by following the instructions on this website. Alternatively, you can use the liuchong/rustup Docker image.

  • Clone the project:
git clone https://git.traumweh.dev/lilith/lyx.git
  • Edit what you need. You might want to change the following files:

    • assets/logo.svg: replace with your logo
    • assets/favion.ico: replace with your favicon (two layer; 16x16 and 32x32)
    • assets/base.css: adjust style sheet
  • Copy config.toml.sample to config.toml and edit its values to suit your needs.

  • Edit the policy lists in lists.toml at your convenience.

  • Choose a database:

    • cargo run --release for SQLite (default, dont use in production)
    • cargo run --release --no-default-features --features postgres for PostgreSQL
    • cargo run --release --no-default-features --features mysql for MySQL

Credits