An open API service indexing awesome lists of open source software.

https://github.com/idigitalflame/linker

Efficient HTTP Redirection Written in Go!
https://github.com/idigitalflame/linker

go golang golang-application golang-library golang-package http

Last synced: 8 months ago
JSON representation

Efficient HTTP Redirection Written in Go!

Awesome Lists containing this project

README

          

# Linker: HTTP URL Shortener

Linker is a Golang based URL shortening service. This self-hosted binary provides fast and efficient HTTP redirection.

Linker is backed by a MySQL database to store name and URL mappings.

## Config

Linker is configured using the following file in "/etc/linker.conf". This file path can be changed using the "-c" flag or by setting the "LINKER_CONFIG" environment variable.

Default Config

```[json]
{
"key": "",
"cert": "",
"listen": "0.0.0.0:80",
"timeout": 5,
"default": "https://duckduckgo.com",
"db": {
"name": "linker",
"server": "tcp(localhost:3306)",
"username": "linker_user",
"password": "password"
}
}
```

## Command Line Options

```[text]
Linker - HTTP Web URL Shortener v3
iDigitalFlame & PurpleSec 2020 - 2023 (idigitalflame.com)

Usage:
-h Print this help menu.
-l List the URL mapping and exit.
-d Dump the default configuration and exit.
-a Add the specified to mapping.
-r Delete the specified to URL mapping.
-c Configuration file path. The environment
variable "LINKER_CONFIG" can be used to
specify the file path instead.
```

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Z8Z4121TDS)