rchunping / https-proxy

https/http proxy, with Basic Authentication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

https-proxy

A simple https/http proxy, with Basic Authentication

Build

go build

Usage

HTTP Proxy

./https-proxy -listen=":8080"

Test

curl --proxy http://localhost:8080 https://www.baidu.com

HTTPS Proxy

# self-signed certificate
./cert.sh

./https-proxy -listen=":8080" -proto=https -key server.key -pem server.pem

Test

curl --proxy https://localhost:8080 --proxy-cacert server.pem  https://www.baidu.com

OR

curl --proxy https://localhost:8080 --proxy-insecure https://www.baidu.com

HTTPS Proxy With Basic Authentication

./https-proxy --listen=":8080" -proto=https -key server.key -pem server.pem -users "foo:123;bar:456"

Test

curl --proxy https://foo:123@localhost:8080 --proxy-insecure https://www.baidu.com

About

https/http proxy, with Basic Authentication

License:BSD 2-Clause "Simplified" License


Languages

Language:Go 89.0%Language:Shell 11.0%