Share UserData between ProxyCtx et request ctx ?

47 views
Skip to first unread message

Sam

unread,
Feb 21, 2018, 12:10:40 PM2/21/18
to goproxy-dev
Hi,

Using Connect and MITM hijack,

I need to copy proxy headers that come along the CONNECT method to request headers sent to the https server.

I put this Header in ProxyCtx.UserData in a
proxy.OnRequest().HandleConnectFunc(

But I can't see it after the MITM hijack. UserData is empty. I think it's a new context at this stage.

Is there a way to save data at the HandleConnect stage, and get it back next in a onRequest().DoFunc() to put it in a request header ?

regards,
Sam.

Sam

unread,
Feb 22, 2018, 10:21:13 AM2/22/18
to goproxy-dev
I saw we can do this with goproxy v2. One can access Connect context from within request.

Hope this version will be released !

regards
Reply all
Reply to author
Forward
0 new messages