Hi,
What I want is copy the request body and dump it to database and also forward this request to target/destination which is a TLS secured endpoint. For this I referred the example given in goproxy git repo for http dump at below link.
https://github.com/elazarl/goproxy/tree/master/examples/goproxy-httpdump Now I am trying to figure out how to setup goproxy to forward all incoming request to an https destination/targets. This is what I was able to achieve
Proxy is running at 8080 port and I tried following
1>
http_proxy=
http://0.0.0.0:8080 wget
http://webhook.site/f227e786-e662-429c-8e69-dc8c57e2249e --header="Content-Type: text/json" --post-file=/home/ubuntu/go/src/warden-proxy/mydata.json
This work as expected.
2> but when my target/ destination is tls enabled and uses
https scheme, it don't work and below call somehow bypass proxy.
http_proxy=
http://0.0.0.0:8080 wget
https://webhook.site/f227e786-e662-429c-8e69-dc8c57e2249e --header="Content-Type: text/json" --post-file=/home/ubuntu/go/src/warden-proxy/mydata.json
Can anyone help me with pointers how to achieve this.
Thanks
Ani.