elazarl / goproxy

An HTTP proxy library for Go
BSD 3-Clause "New" or "Revised" License
6.03k stars 1.09k forks source link

Use onRequest for HTTP(s) connections #124

Open fortytw2 opened 9 years ago

fortytw2 commented 9 years ago

Hey! I'm trying to use onRequest to edit/return special responses in a lot of cases with goproxy, but it seems any request directly to an https:// URL doesn't use this, instead does it's own thing? Anything that first goes through http:// and is redirected works just fine though

skytraveler commented 7 years ago

I got the same problems

rahulwa commented 7 years ago

You need to do man-in-the-middle attack for https first, so that goproxy can read/intercept the traffic. Something like this. https://github.com/rahulwa/camouflage/blob/master/proxy/proxy.go#L116-L120

AnoopPutta commented 4 years ago

It still doesnt work for https when i set MITM. Any other solution please.