Error proxying https
Which platform are you running AnyProxy
Mac
The version of the AnyProxy
4.1.0
Your expected behavior of AnyProxy
Upstream proxying https request.
The actual behavior of AnyProxy
Gives me error.
The log of the error
full log(mirror - mapped to localhost):
$ curl -x https://mirror.com:8007 --proxy-user user:pass -L https://google.com/ -v
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to stream.com (127.0.0.1) port 8007 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS alert, Server hello (2):
* error:14004410:SSL routines:CONNECT_CR_SRVR_HELLO:sslv3 alert handshake failure
* Closing connection 0
curl: (35) error:14004410:SSL routines:CONNECT_CR_SRVR_HELLO:sslv3 alert handshake failure
Almost fixed this, but still, get error:
[AnyProxy ERROR][2019-08-02 19:59:49]: err occurred when prepare certs for SNI - Error: Invalid PEM formatted message.
when i pass custom key and cert
#409
But works for http requests.
Now I'm getting
Error: Client network socket disconnected before secure TLS connection was established
Solved by implementing own https proxy agent with CONNECT method realization and injecting it as an agent to AnyProxy.
@oleza post your code in beforeDealHttpsRequest pls
@oleza Can you please post your solution for this? Thank you
#431 pls visit this url