sus url shortener
Go to file
2024-02-29 15:36:06 +00:00
.gitignore add sus executable to .gitignore 2023-08-29 19:41:05 +01:00
docker-compose.yml docker compose restart unless stopped 2023-08-29 19:43:19 +01:00
Dockerfile initial commit 2022-05-26 02:08:50 +01:00
go.mod initial commit 2022-05-26 02:08:50 +01:00
go.sum initial commit 2022-05-26 02:08:50 +01:00
gohookr.sh add gohookr script 2022-05-26 02:16:07 +01:00
LICENSE add LICENSE 2022-05-28 15:16:54 +01:00
main.go handle trailing slash 2024-02-29 15:36:06 +00:00
Makefile add install script for susmng 2022-05-26 02:33:20 +01:00
readme.md update readme 2022-06-26 06:54:58 +01:00
sus.jpg :sus: 2022-05-26 16:30:41 +01:00
susmng.py add list command to list all shortlinks 2022-06-26 06:53:26 +01:00

sus

sus URL shortener

  • 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

  1. generate the secret used to create and delete shortlinks

     echo SECRET=`pwgen -s 64 1` >> .env
    
  2. run the services

     docker-compose up -d --build
    

server environment variables

  • SECRET---the secret used for signature verification
  • LISTEN_ADDRESS---the address the server is listening on (default is 0.0.0.0:80)
  • INDEX_GET_REDIRECT---the URL the user should be redirected to if they try to access / on the server (default is http://alv.cx)

setting up susmng

  1. install susmng

     make install-susmng
    
  2. create configuration files

     susmng init
    
  3. edit configuration files (~/.config/susmng/config.json) to add your secrets