-
Notifications
You must be signed in to change notification settings - Fork 238
Description
Description
With the new version of needle (3.1.0) the current approach (here) to set up tunnelling doesn't work anymore (version 3.0.0 works fine). Scanning the network using Wireshark shows that needle ends up looping CONNECT requests to the proxy. I suspect that needle tries to use both the tunnel agent while also passing proxy parameters from the environment (HTTP_PROXY and HTTPS_PROXY) and thus ends up in this weird state.
We were previously using global agent together with _PROXY environment variables to force needle to do CONNECT requests but since the new version that also doesn't work (which might be a different issue)
How to reproduce
- setup local
mtimproxy(or any other proxy) - set up tunnelling using the
tunnelagent as describe in the documentation, pointingproxyandportto themtimproxy. - set up
HTTP_PROXYandHTTPS_PROXYenvironment variables to point to the same proxy - try and make a network call using
needle
Expected behaviour
When HTTP_PROXY and HTTPS_PROXY is set, and tunnel is configured, needle should make a CONNECT request to the proxy and establish a tunnel
Actual behaviour
needle tries to establish CONNECT request but doesn't succeed