Zitrone44 / zlnk

Zitrone's Link Shortner

Home Page:https://zlnk.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZLNK

Installation

Precompiled

Precompiled binaries are available at the releases page.

From Source

Requirements:

  • git
  • rust (nightly)
  • cargo
git clone https://github.com/Zitrone44/zlnk.git
cd zlnk
cargo build --release

Configuration

Enviroment Variables

Name Default Possible Values Description
REDIS_URL redis://localhost Any redis URI (redis://host:port/db) The URL of the redis instance zlnk should use
URL_REGEX https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*) Any rust RegEX Only URLs that match this regex can be shortend
SHORT_LENGTH 5 Any int (0 < i < 2^64) Length of an short url
SHORT_ALPHABET hex hex, decimal, alpha, alpha-numeric Alphabet used in short urls
BAD_REQUEST_MESSAGE Invalid URL Any String Error message if submitted url does not matches the regex
MMDB_PATH ./GeoLite2-Country.mmdb Any Path to an mmdb file Path to the mmdb file used for country detection
TRUST_PROXY false Set => true, Not Set => false If set the X-Forwarded-For header value is used as request ip
DISABLE_STATS false Set => true, Not Set => false If set no stats are collected

About

Zitrone's Link Shortner

https://zlnk.de

License:MIT License


Languages

Language:Rust 85.6%Language:HTML 8.9%Language:JavaScript 4.3%Language:Shell 1.2%