|neil 730be29377 Updating instructions and contributing guide||преди 2 дни|
|assets||преди 3 седмици|
|db||преди 2 дни|
|migrations||преди 3 седмици|
|src||преди 2 дни|
|templates||преди 3 седмици|
|.gitignore||преди 2 дни|
|Cargo.toml||преди 2 дни|
|LICENSE||преди 3 седмици|
|README.md||преди 2 дни|
|lang.json||преди 2 дни|
Link shortener in Rust.
Developed to be as minimalist and lightweight as possible.
Powered by the Rocket framework using (server-side) Handlebars templates.
Official instance: https://s.42l.fr/
git clone https://git.42l.fr/42l/rs-short.git
Edit what you need. You might want to change the following elements:
main.rs: replace with your instance hostname
main.rs: replace with the hostname of the organization hosting the project
assets/hoster-logo.png: replace with the logo of your organization
assets/logo.svg: the software logo
assets/background.jpg: the default background
Create a file named
Rocket.toml at the project root, containing the following:
[global] address = "<ADDRESS>" template_dir = "templates" secret_key = "<SECRET KEY>" [global.databases.sqlite_database] url = "db/db.sqlite"
<ADDRESS>by the address to listen on
<SECRET KEY>by the result of the command
openssl rand -base64 32
Eventually change the database storage path. You can specify more parameters following the Rocket documentation.
banned_url_to.list file and enter keywords that causes IPs submitting links to get a
403 Forbidden if their links contain those keywords. Example:
You can configure a fail2ban instance to watch your favourite reverse-proxy logs to see which IPs are getting a 403 and ban accordingly.
cargo run --release
The initial version of the software has been developed in one week ; there’s still a lot to do.
Here are many ways to contribute:
templates.rsand add your language in the ValidLanguages structure.
main.rsto something more readable
If you like the work done on this project, please consider to donate or join the association. Thank you!