Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tunnelling doesn't work in v3.1.0 #406

@pkey

Description

@pkey

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

  1. setup local mtimproxy (or any other proxy)
  2. set up tunnelling using the tunnel agent as describe in the documentation, pointing proxy and port to the mtimproxy.
  3. set up HTTP_PROXY and HTTPS_PROXY environment variables to point to the same proxy
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions