toxiproxy icon indicating copy to clipboard operation
toxiproxy copied to clipboard

write EPROTO ...:error:...:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40

Open OnkelTem opened this issue 4 years ago • 2 comments

I create a basic transparent proxy:

$ toxiproxy-cli create remote -l localhost:26379 -u <address>:443

then I check its status:

$ toxiproxy-cli l
Name                    Listen          Upstream                Enabled         Toxics
======================================================================================
remote                  127.0.0.1:26379 <address>:443           enabled         None

Now when I try to connect using https://github.com/websockets/ws library I get this error message:

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

My connect line is:

let ws = new WebSocket(address);

where address is: wss://127.0.0.1:26379/ws;

Any ideas what does that mean?

OnkelTem avatar Mar 10 '21 12:03 OnkelTem

Seems like the issue is host losing. Is there a way to ask toxiproxy to use the host I specified when creating the proxy? I.e. if I use:

 $ toxiproxy-cli create remote -l localhost:26379 -u my.super.host:443

then to substitute host with my.super.host.

OnkelTem avatar Mar 10 '21 13:03 OnkelTem

As temporal solution there is sniproxy that would be between Toxiproxy and HTTPS upstream.

miry avatar Oct 22 '21 14:10 miry