Skip to content

Error when trying to connect to HTTPS site through proxy #658

@rightaway

Description

@rightaway

I get this error when connecting to an HTTPS site through a proxy. It works fine when I connect to that same site using HTTP (the site is available in both HTTP and HTTPS). To test it you can try with any HTTPS proxies (test ones available at https://free-proxy-list.net/, I've tried only the ones with a 'Yes' in the 'Https' column.)

(node:11581) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): 
Error: write EPROTO 140378207070016:error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

The code

async function download() {
  const response = await axios('https://api.ipify.org', {
    timeout: 5000,
    proxy: {
      host: '104.154.142.106',
      port: 3128
    }
  })
  console.log(response.headers)
}

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