No description
Find a file
2023-12-18 13:51:16 +03:00
src Add --alias-file option (for packaging and systemd service) 2023-12-18 13:51:16 +03:00
.gitignore Fork ivabus/aliurl 2023-06-20 21:02:27 +03:00
.rustfmt.toml Fork ivabus/aliurl 2023-06-20 21:02:27 +03:00
Cargo.toml Add --alias-file option (for packaging and systemd service) 2023-12-18 13:51:16 +03:00
LICENSE Add README.md and LICENSE 2023-06-21 08:57:00 +03:00
README.md Add --alias-file option (for packaging and systemd service) 2023-12-18 13:51:16 +03:00
Rocket.toml Fork ivabus/aliurl 2023-06-20 21:02:27 +03:00

urouter

Static (list of routes read once) http router for routing small domains.

Installation

git clone https://github.com/ivabus/urouter
cd urouter

Edit alias.json (or any other JSON file, check --alias-file option) and cargo run

alias.json example

[
  {
    "uri": "uri",
    "alias": "file"
  },
  {
    "uri": "uri2",
    "alias": "http://example.com",
    "is_url": true
  },
  {
    "uri": "/",
    "alias": "https://somecoolscript.sh",
    "is_url": true,
    "curl_only": true
  }
]

"curl_only" thing for curl https://url | sh like scripts.

License

The project is licensed under the terms of the MIT license.