Home » Php » ssl – Trying to log requests and responses buffer raw from php proxyserver

ssl – Trying to log requests and responses buffer raw from php proxyserver

Posted by: admin February 25, 2020 Leave a comment

Questions:

Welcome bro, now I use php-http-proxy
to make a proxy server and use file_put_contents to log all requests and responses buffer.

In this photo, I request google server as HTTP
redirect me to https (SO GOOD)
put response for https is encrypted because of SSL certs I know
but response appears normal in my browser
put I want to see the response in the logger

Now the question is how can I decrypt or whatever to see the content without encryption?

enter image description here

$this->_socket = @\stream_socket_client("tcp://{$this->_remoteHost}:{$this->_remotePort}",$errno, $errstr, 0, \STREAM_CLIENT_ASYNC_CONNECT);

Please see
https://github.com/walkor/php-http-proxy/blob/master/start.php
https://github.com/walkor/php-http-proxy/blob/master/Workerman/Connection/AsyncTcpConnection.php
https://github.com/walkor/php-http-proxy/blob/master/Workerman/Connection/TcpConnection.php

in my mind to use whatever like mitm to decrypt content

How to&Answers: