Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.2 KB

README.md

File metadata and controls

46 lines (32 loc) · 1.2 KB

HTTP Reverse Proxy

This project is a small http reverse proxy written in Golang. The goal is to learn and implement a http server proxy that embeds a cache feature.

This server is very primitive and does not implements the full-featured behavior for proxies and caching mechanisms.

Proxy server

This repo provides a cli binary that runs the proxy server with the cache. Several options are available.

Build

go build ./cmd/proxy-server/proxy-server.go

Help

./proxy-server --help

Run

./proxy-server --target-server "http://localhost:5051" --bind-addr ":5050"

Features

  • Can proxy not secure http requests to a http server.
  • Cache all GET and HEAD requests.
  • Several `Cache-Control" options (max-age, min-fresh, public, max-stale, ...)

Resources