wenerme / proxc

Proxy Server with Cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Proxy Server with Cache

License:MIT License


Languages

Language:Go 99.4%Language:Makefile 0.6%