Skip to content

Proxies are not working #4165

@frzsombor

Description

@frzsombor

Describe the bug

Proxy support is still not available (or has many flaws) in axios. I think this problem should get much more attention, because axios is the biggest, most popular http client in the whole ecosystem. If someone is working on a project that requires sending (complex?) http(s) requests, and decides to use axios, they can't even debug the requests/responses with any web debugging proxy (like Fiddler) because it is simply not working.

  1. Documentation here states that we can define proxy settings using the conventional http_proxy and https_proxy environment variables. No, it's not working.
  2. Using the proxy option also fails the same way, just like setting it as "defaults".

Received error:
Error: write EPROTO 4479901120:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:

Based on these facts, the documentation has been incorrect for a long time, so I'm suggesting to fix either the code or if can not be fixed, update the docs (by removing proxy support and/or recommending to use an external http(s) proxy agent instead of trying to suggest configuring proxies through axios config).

Similar issues: #1877 #3384 #3459 and a lot of other open (and closed) proxy related issues

To Reproduce

Try using a popular HTTP debugger or proxies.

Expected behavior

The proxies to work or to be removed from the docs.

Environment

  • Axios Version: v0.22.0
  • Adapter: default
  • Node.js Version: v14
  • OS: OSX 10.15.6

Additional context/Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions