Link shortener in Rust.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
neil 730be29377 Updating instructions and contributing guide 2 дней назад
assets way lighter background, 1.3MB -> 0.38MB 3 недель назад
db Don't delete the db folder; don't push blacklists 2 дней назад
migrations Initial commit, version 1.0.0 3 недель назад
src 1.1.0 release 2 дней назад
templates Initial commit, version 1.0.0 3 недель назад
.gitignore Don't delete the db folder; don't push blacklists 2 дней назад
Cargo.toml 1.1.0 release 2 дней назад
LICENSE Initial commit, version 1.0.0 3 недель назад Updating instructions and contributing guide 2 дней назад
lang.json 1.1.0 release 2 дней назад


Link shortener in Rust.

Developed to be as minimalist and lightweight as possible.

Powered by the Rocket framework using (server-side) Handlebars templates.

  • Less than 1000 lines of code, including 20% of comments
  • Consumes between 5MB and 20MB of RAM
  • No JS
  • No CSS framework ; CSS is handmade and all rules are prefixed to avoid rule conflicts
  • No tracking features at all
  • No unsafe block


  • Includes a captcha as a minimal protection against spamming
  • Easily customizable assets
  • Only needs a SQLite database to work
  • Localization (available in French and English)
  • Counting clicks
  • Allows shortcut deletion

Official instance:

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
  • Edit what you need. You might want to change the following elements:

    • constant INSTANCE_HOSTNAME in replace with your instance hostname
    • constant HOSTER_HOSTNAME in 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:

address = "<ADDRESS>"
template_dir = "templates"
secret_key = "<SECRET KEY>"

url = "db/db.sqlite"
  • Replace <ADDRESS> by the address to listen on
  • Replace <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.

  • Create the 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:

  • Translate!
    • Add your entries in the lang.json file.
    • Once you’re done, edit and add your language in the ValidLanguages structure.
  • Improve the software modularity
    • Add a configuration file
    • Configure instance and hoster’s hostname from the configuration file
    • Toggle captcha
  • Add postgresql compatibility
  • Add different CSS themes (a dark theme would be a great start!)
  • Develop a more resilient protection to spambots
    • Improve hostname blacklisting ?
    • Blacklist shortcut names ?
    • Integrate a ban / ratelimiting system ? (the current system relies entirely on a separate fail2ban instance)
  • Clean up the code
    • Restructure the rocket routes in to something more readable
    • Make a better usage of template contexts
    • Improve the forms if you’re knowledgeable in Rocket forms
    • Separate the code into more files if necessary

This software is mainly developed and maintained by Neil for the Association 42l.

If you like the work done on this project, please consider to donate or join the association. Thank you!

Graphical credits