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.
This repo provides a cli binary that runs the proxy server with the cache. Several options are available.
go build ./cmd/proxy-server/proxy-server.go
./proxy-server --help
./proxy-server --target-server "http://localhost:5051" --bind-addr ":5050"
- 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, ...)
- https://www.digitalocean.com/community/tutorials/web-caching-basics-terminology-http-headers-and-caching-strategies
- https://github.com/lox/httpcache
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
- https://github.com/traefik/traefik