Our proxy will be an HTTPS server (--proto https), so we need certificate and private key. Let’s use self-signed certificate.
- cd certs
- ./gen.sh
Copy your certificate in PEM format (the format that has ----BEGIN CERTIFICATE----
in it) into /usr/local/share/ca-certificates
and name it with a .crt
file extension.
Then run sudo update-ca-certificates
.
- cd server
- go run main.go
- cd certs
- curl -Lv --proxy https://localhost:8888 --proxy-cacert localhost.pem https://google.com
- cd client
- go run client.go