You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. Accordingly, it will spawn one process per connection.
As an alternative, we should also support running the local SSH client as a SOCKS proxy server like ssh -D 1080 user@example.com. This will start a local SOCKS proxy server listening on 127.0.0.1:1080 and will accept any number of TCP/IP connections over a single SSH client process.
Technically, this is already supported by manually launching the SSH client using the above command and then simply using https://github.com/clue/reactphp-socks to connect to this local SOCKS proxy server.
Accordingly, we should provide a new class that will automatically spawn this local SOCKS proxy server on demand only and will then use the above SOCKS client library to connect to this server. This means that the process will automatically be spawned on demand only and also that it should be closed when it is not used for some time (idle period similar to friends-of-reactphp/mysql#88).
Additionally, by leveraging the existing SOCKS client implementation we can also provide secure TLS support (#4). I've started looking into this and will keep this ticket updated as I make progress.
The text was updated successfully, but these errors were encountered:
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. Accordingly, it will spawn one process per connection.As an alternative, we should also support running the local SSH client as a SOCKS proxy server like
ssh -D 1080 user@example.com
. This will start a local SOCKS proxy server listening on127.0.0.1:1080
and will accept any number of TCP/IP connections over a single SSH client process.Technically, this is already supported by manually launching the SSH client using the above command and then simply using https://github.com/clue/reactphp-socks to connect to this local SOCKS proxy server.
Accordingly, we should provide a new class that will automatically spawn this local SOCKS proxy server on demand only and will then use the above SOCKS client library to connect to this server. This means that the process will automatically be spawned on demand only and also that it should be closed when it is not used for some time (idle period similar to friends-of-reactphp/mysql#88).
Additionally, by leveraging the existing SOCKS client implementation we can also provide secure TLS support (#4). I've started looking into this and will keep this ticket updated as I make progress.
The text was updated successfully, but these errors were encountered: