local-cors-proxy icon indicating copy to clipboard operation
local-cors-proxy copied to clipboard

SSL error

Open andreamancuso opened this issue 4 years ago • 3 comments

Hi,

Thank you for publishing this package!

I am getting the following:

Request Proxied -> /api/v1/[...] // Replaced Request Proxied -> /api/v1/[...] // Replaced internal/streams/legacy.js:61 throw er; // Unhandled stream error in pipe. ^

Error: write EPROTO 139838356379520:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1942:

at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16) {

errno: -71, code: 'EPROTO', syscall: 'write' }

Could it be related to using self-signed certificates?

Thanks, Andrea

andreamancuso avatar Apr 03 '20 14:04 andreamancuso

Hi, To disable SSL verification, you can add NODE_TLS_REJECT_UNAUTHORIZED=0 at the beginning of your command like this: NODE_TLS_REJECT_UNAUTHORIZED=0 lcp --proxyUrl https://github.com

berker avatar Apr 09 '20 09:04 berker

this didn't fix the issue for me :/

➜  ✗ NODE_TLS_REJECT_UNAUTHORIZED=0  lcp --proxyUrl https://localhost:3001

 Proxy Active 

Proxy Url: https://localhost:3001
Proxy Partial: proxy
PORT: 8010
Credentials: false
Origin: *

To start using the proxy simply replace the proxied part of your url with: http://localhost:8010/proxy

Request Proxied -> /opentokenisation/v1/api/debbie/read/6e0d4a89-9abf-461d-b3be-ba02b2cfe01a/4001653
(node:126527) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
internal/streams/legacy.js:61
      throw er; // Unhandled stream error in pipe.
      ^

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

    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16) {
  errno: 'EPROTO',
  code: 'EPROTO',
  syscall: 'write'
}

4fthawaiian avatar May 27 '21 02:05 4fthawaiian

Yes, same problem with wrong version number

azat-co avatar Jun 07 '22 21:06 azat-co