LinkPreview.net Proxy Server with Caching

Related tags

Network lpproxy
Overview

LinkPreview.net Proxy Server with Caching

Description

LinkPreview API/Image Proxy Server with Caching written in Go.

Features:

  • In-memory caching layer for API requests
  • Eliminate the need to expose your LinkPreview API keys on the frontend
  • Image proxy to prevent leaking client IP addresses
  • Simple Referer header protection (accept requests from your domain only)

Installation

How to use:

  1. Download official executable. Download for Linux 64bit Download for Windows 64bit

  2. Create .env file configuration, see .env.example

Sample .env file:

ADDR="localhost:8000"
LINK_PREVIEW_KEY="123456"
  1. Start your server with ./lpproxy

Note: If you want to start SSL server, add your certificate files to the .env config or create self-signed ones with:

openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.key

Usage

Make sure your proxy is running, then simply use this instead of api.linkpreview.net endpoint:

http://your-ip-address/linkpreview/?q=http://google.com

Serve images through your proxy:

http://your-ip-address/imageproxy/?src=https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png

For more options on image proxy, see https://github.com/willnorris/imageproxy

Installing as a service

How to install and run linkpreview proxy as a Systemd service in Linux:

cd /etc/systemd/system

Create a file named lpproxy.service and include the following:

[Unit]
Description=LinkPreviewProxy

[Service]
User=root
WorkingDirectory=/path/where/your/lpproxy/binary/is/located/
ExecStart=/path/where/your/lpproxy/binary/is/located/lpproxy
Restart=always

[Install]
WantedBy=multi-user.target

Reload the service files to include the new service. sudo systemctl daemon-reload

Start your proxy sudo systemctl start lpproxy.service

To check the status of your proxy sudo systemctl status lpproxy.service

To enable proxy on every reboot sudo systemctl enable lpproxy.service

Compile from sources

First, download and install Golang, then clone the project and compile:

git clone [email protected]:interactive32/lpproxy.git
cd lpproxy
go build

You can also cross compile for specific architecture:

env GOOS=windows GOARCH=amd64 go build
You might also like...
mt-multiserver-proxy is a reverse proxy designed for linking multiple Minetest servers together

mt-multiserver-proxy mt-multiserver-proxy is a reverse proxy designed for linking multiple Minetest servers together. It is the successor to multiserv

A simple tool to convert socket5 proxy protocol to http proxy protocol

Socket5 to HTTP 这是一个超简单的 Socket5 代理转换成 HTTP 代理的小工具。 如何安装? Golang 用户 # Required Go 1.17+ go install github.com/mritd/s2h@master Docker 用户 docker pull m

IP2Proxy Go package allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.

IP2Proxy Go Package This package allows user to query an IP address if it was being used as VPN anonymizer, open proxies, web proxies, Tor exits, data

Proxy - Minimalistic TCP relay proxy.

Proxy Minimalistic TCP relay proxy. Installation ensure you have go = 1.17 installed clone the repo cd proxy go install main.go Examples Listen on po

Http-logging-proxy - A HTTP Logging Proxy For Golang

http-logging-proxy HTTP Logging Proxy Description This project builds a simple r

Battlesnake-logging-proxy - A little proxy between the internet and your battlesnake

battlesnake-logging-proxy a little proxy between the internet and your battlesna

A secure image proxy server

go-camo Contents About How it works Differences from Camo Installing pre-built binaries Building Running Running on Heroku Securing an installation Co

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

frp README | 中文文档 What is frp? frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the Internet. As of now, it s

一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
Owner
interactive32
We build easy to use web-based applications
interactive32
concurrent caching proxy and decoder library for collections of PMTiles

go-pmtiles A caching proxy for the serverless PMTiles archive format. Resolves several of the limitations of PMTiles by running a minimalistic, single

Protomaps 45 Jan 2, 2023
Go package to simulate bandwidth, latency and packet loss for net.PacketConn and net.Conn interfaces

lossy Go package to simulate bandwidth, latency and packet loss for net.PacketConn and net.Conn interfaces. Its main usage is to test robustness of ap

Cevat Barış Yılmaz 313 Oct 14, 2022
Tcp-proxy - A dead simple reverse proxy server.

tcp-proxy A proxy that forwords from a host to another. Building go build -ldflags="-X 'main.Version=$(git describe --tags $(git rev-list --tags --max

Injamul Mohammad Mollah 0 Jan 2, 2022
An IPFS bytes exchange for caching and retrieving data from Filecoin

?? go-hop-exchange An IPFS bytes exchange to allow any IPFS node to become a Filecoin retrieval provider and retrieve content from Filecoin Highlights

Myel 31 Aug 25, 2022
“Dear Port80” is a zero-config TCP proxy server that hides SSH connection behind a HTTP server!

Dear Port80 About The Project: “Dear Port80” is a zero-config TCP proxy server that hides SSH connection behind a HTTP server! +---------------------

Abbas Gheydi 6 Jun 29, 2022
EasyTCP is a light-weight and less painful TCP server framework written in Go (Golang) based on the standard net package.

EasyTCP is a light-weight TCP framework written in Go (Golang), built with message router. EasyTCP helps you build a TCP server easily fast and less painful.

zxl 551 Jan 7, 2023
go stomp server base on net/http

stompserver go stomp server base on "net/http" base on "net/http" and "golang.org/x/net/websocket" so use one port, you can be WebServer or StompServe

0xAAFF 1 Sep 22, 2022
An experimental Tor-Proxy serivce written in Go using Go-proxy and Go-libtor.

tor-proxy An experimental standalone tor-proxy service built with Go, using go-proxy, go-libtor and bine. This is a simple replacement to Tor's origin

Narasimha Prasanna HN 35 Nov 9, 2022