proxc

module
v0.0.0-...-51c7e80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2022 License: MIT

README

proxc

Proxy Server with Cache in Golang

go install github.com/wenerme/proxc/cmd/proxc@latest
proxc config                # current config
DB_DIR=/tmp/proxc/db proxc

curl -x 127.0.0.1:9080 https://wener.me -v > /dev/null
curl -x 127.0.0.1:9080 https://wener.me -v > /dev/null  # X-From-Cache: 1

# cached data
sqlite3 /tmp/proxc/db/wener.me.sqlite 'select method,url,raw_size,body_size,length(body) from http_responses'

Support Encoding

# initial
curl -s https://wener.me | sha256sum
curl -sx 127.0.0.1:9080 https://wener.me -vk | sha256sum
# cached - X-From-Cache: 1
curl -sx 127.0.0.1:9080 https://wener.me -vk | sha256sum
curl -sx 127.0.0.1:9080 https://wener.me -vk --compressed | sha256sum

curl --version | grep brotli
curl -sx 127.0.0.1:9080 https://wener.me -vk --compressed -H 'Accept-Encoding: br' | sha256sum

Directories

Path Synopsis
cmd
Package httpcache provides a http.RoundTripper implementation that works as a mostly RFC-compliant cache for http responses.
Package httpcache provides a http.RoundTripper implementation that works as a mostly RFC-compliant cache for http responses.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL