Closed dmrlawson closed 1 year ago
You need to use the tunnel
option in the gun:get
call, otherwise Gun can't know this is for a tunnel and will try to send the request to the proxy server itself. This is a change required following the addition of tunneling over HTTP 2 proxies. Try:
StreamRef = gun:get(ConnPid, "/", [], #{tunnel => TunnelStreamRef}).
You need to use the
tunnel
option in thegun:get
call, otherwise Gun can't know this is for a tunnel and will try to send the request to the proxy server itself. This is a change required following the addition of tunneling over HTTP 2 proxies. Try:StreamRef = gun:get(ConnPid, "/", [], #{tunnel => TunnelStreamRef}).
Ah right, thank you! I can confirm that this works.
Hi, I'm trying to use a proxy with gun (2.0.0-rc.2) but hitting a problem.
I can make a basic request without a proxy:
When I use
gun:connect
to tunnel through a proxy, I get this (changed toexample-http-proxy.com
):I'm unsure as to whether this is a bug or if I'm just using the api incorrectly.
In wireshark I can see that the tunnel gets opened but the GET request is never sent.