Currently, the SshProcessConnector allows creating plaintext TCP/IP connections which can be used by higher-level protocol implementations. It is implemented by spawning an SSH client like ssh -W google.com:80 user@example.com and will access the standard I/O process streams and represent this as a single connection.
Due to the way how ReactPHP's SecureConnector uses PHP's underlying stream_socket_enable_crypto() function, it requires an actual full-duplex socket stream and does not support the virtual stream returned by the SshProcessConnector. As such, it is currently impossible to create a secure TLS connection using this class.
We should support secure TLS connections as part of this library. While this will not be required for a number of use cases (such as accessing a plaintext database through an SSH tunnel), it is still a critical feature for other use cases (such as sending HTTPS requests through an SSH tunnel). I've started looking into possible implementation approaches and will keep this ticket updated as I make progress.
Currently, the
SshProcessConnector
allows creating plaintext TCP/IP connections which can be used by higher-level protocol implementations. It is implemented by spawning an SSH client likessh -W google.com:80 user@example.com
and will access the standard I/O process streams and represent this as a single connection.Due to the way how ReactPHP's
SecureConnector
uses PHP's underlyingstream_socket_enable_crypto()
function, it requires an actual full-duplex socket stream and does not support the virtual stream returned by theSshProcessConnector
. As such, it is currently impossible to create a secure TLS connection using this class.We should support secure TLS connections as part of this library. While this will not be required for a number of use cases (such as accessing a plaintext database through an SSH tunnel), it is still a critical feature for other use cases (such as sending HTTPS requests through an SSH tunnel). I've started looking into possible implementation approaches and will keep this ticket updated as I make progress.