sus url shortener
.gitignore | ||
docker-compose.yml | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
gohookr.sh | ||
LICENSE | ||
main.go | ||
Makefile | ||
readme.md | ||
sus.jpg | ||
susmng.py |
sus
sus URL shortener
susmng
usage (managing shortlinks)
-
creating a new shortlink at https://pls.cx/shortlink
susmng [-s pls.cx] create -l shortlink -v https://example.com
-
deleting the shortlink https://pls.cx/shortlink
susmng [-s pls.cx] delete -l shortlink -v confirm
-
listing all shortlinks on the server pls.cx
susmng [-s pls.cx] list
susmng
will assume the first server in the secrets
section of the configuration file if the -s
flag is not provided.
installation
running the server
-
generate the secret used to create and delete shortlinks
echo SECRET=`pwgen -s 64 1` >> .env
-
run the services
docker-compose up -d --build
server environment variables
SECRET
- the secret used for signature verificationLISTEN_ADDRESS
- the address the server is listening on (default is0.0.0.0:80
)INDEX_GET_REDIRECT
- the URL the user should be redirected to if they try to access/
on the server (default ishttp://alv.cx
)MAX_AGE_MS
- how old a request can be (in milliseconds) before the server will refuse to process it (default is 500 milliseconds)
setting up susmng
-
install
susmng
make install-susmng
-
create configuration files
susmng init
-
edit configuration files (
~/.config/susmng/config.json
) to add your secrets