No description
| assets | ||
| migrations | ||
| src | ||
| templates | ||
| .gitignore | ||
| Cargo.toml | ||
| config.toml.sample | ||
| Containerfile | ||
| lang.json | ||
| LICENSE | ||
| README.md | ||
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
unsafeblock - 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 logoassets/favion.ico: replace with your favicon (two layer; 16x16 and 32x32)assets/base.css: adjust style sheet
-
Copy
config.toml.sampletoconfig.tomland edit its values to suit your needs. -
Edit the policy lists in
lists.tomlat your convenience. -
Choose a database:
cargo run --releasefor SQLite (default, don’t use in production)cargo run --release --no-default-features --features postgresfor PostgreSQLcargo run --release --no-default-features --features mysqlfor MySQL
Credits
- Logo by Lilith.
- Based on rs-short by Neil for La Contre-Voie.
- Inter font by Rasmus.