Project is to make a PHP page implementing a SSL tunel to "intercept" a tcp connection.
The PHP page has to work similar to the "STUNNEL" at [login to view URL], where first 4 lines describe how the "intercepter" shall work.
Flow is:
Send data to external SSL Tcp Server: tcp client external --> PHPTcpServer --> PHPSSLTTcpClient --> external SSL Tcp Server
Receive data from external SSL Tcp Server: External SSL Tcp Server --> PHPTcpSSLTClient -- > PHPTcpServer --> Tcp client external
I have tested and working PHP code to implement the PHPTcpServer if needed.
The PHPSSLTTCpClient shall have implemeted functions as to: OnConnect, OnDisconnect, OnRead, OnError and ofcause writing to the socket.