Skip to content

Request to HTTPS with HTTP proxy fails #925

Description

@kparkov

Summary

Trying to do a HTTPS request with a HTTP proxy fails.

const req = await axios({
  url: 'https://somedomain.com',
  proxy: {
    host: '89.151.146.7',
    port: 6060,
    auth: {
      username: 'myname',
      password: 'mypass',
    },
  },
});

Results in:

Error: write EPROTO 140736379442112:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794

The problem is already described by @chovy in this ticket, which ended up closed as OP did not have the same problem: #662

@chovy says:

I still have this issue not being able to hit an https url with an http proxy. I can do it fine in request and also in curl from shell. Something not working with axios. I get an EPROTO error.

### Context

  • axios version: v0.16.1
  • Environment: node v7.10.0, Mac OSX Sierra

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions