An open-source link shortener forked from NGN's Kisalt!
This repository has been archived on 2024-10-21. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2024-10-06 02:32:05 +00:00
.github/workflows first commit 2024-02-02 22:50:21 +03:00
src update crow version, add colors to UI 2024-05-13 19:24:36 +03:00
static Update static/index.html 2024-10-06 00:49:03 +00:00
.gitignore update crow version, add colors to UI 2024-05-13 19:24:36 +03:00
Dockerfile update crow version, add colors to UI 2024-05-13 19:24:36 +03:00
LICENSE.txt first commit 2024-02-02 22:50:21 +03:00
Makefile update crow version, add colors to UI 2024-05-13 19:24:36 +03:00
README.md Update README.md 2024-10-06 02:32:05 +00:00

furao.link

furao.link is a dead simple link shortener written with in C++ using the Crow web framework, and a fork of NGN's Kisalt..

Deploy

First off, clone the repository. Make changes to the interface if needed.

CD into it.

Build your own Docker image with: docker build --tag 'furao' .

Don't forget the dot at the end.

Then, you do this when it has been built.

docker run -d --restart=unless-stopped \
     -p 3402:8080            \
     -e URL=https://httpsurlhere.com      \
     -v $PWD/data:/data                \
     furao

Change the URL accordingly. Make sure it's https. You can also replace the 3402 with any available port you like.

To disable saving the links, you can use the NOSAVE option. A volume is not needed when using this option:

docker run -d --restart=unless-stopped \
    -p 3402:8080             \
    -e URL=https://httpsurlhere.com       \
    -e NOSAVE=1                        \
    furao

Placing behind reverse proxy

What the hell is NGINX? Just install Caddy.

apt-get install caddy

Then, make a little directory for your Caddyfile. It does not have to be in the same directory as furao-link.

mkdir caddyfiles
cd caddyfiles

Now, make a caddyfile. It must be called Caddyfile. Case-sensitive.

nano Caddyfile

Type this with the url you specificed (the domain must have the VPS/system IP linked to it, and, again, replace 3402 accordingly:

httpsurlhere.com {
    reverse_proxy localhost:3402
}```

Now, write out the file, and then type...

```bash
caddy reload```

Bam! You won the game. Now CD out and go ahead with your business.

### Usage
You can use the web interface to shorten links, or you can directly use the API:
```bash
curl https://k.example.com/add\?url=<url>```