顾名思义,短链服务是一种将长网址转换为较短、更易分享的链接的服务。阿蛮君在 github 上发现了一款不错的开源程序,它可以自定义拦截器和跳转方式,属实是对于有特别需求的来说很方便。遗憾的是,该程序并没有后台管理系统。
搭建方式:
docker run -d --name shorturl -p 80:80 hausen1012/shorturl
效果如下:
方便的是,还可以使用 api 生成短链接。
<div class="pk-code-tools" data-pre-id="hljs-item-1">curl -s http://ip/api/link?url=https://www.baidu.com/
e="查看开源项目的所有文章" href="https://www.amjun.com/tag/kaiyuanxiangmu/" target="blank" rel="noopener">开源项目地址:https://github.com/ellermister/shorturl
项目演示网站:https://x007.in/
div>来自:https://www.amjun.com/2472.html

