clue / reactphp-ssh-proxy

Async SSH proxy connector and forwarder, tunnel any TCP/IP-based protocol through an SSH server, built on top of ReactPHP.
https://clue.engineering/2018/introducing-reactphp-ssh-proxy
MIT License
21 stars 7 forks source link

Simplify usage by supporting new default loop #27

Closed clue closed 2 years ago

clue commented 2 years ago

This changeset simplifies usage by supporting the new default loop.

// old (still supported)
$proxy = new Clue\React\SshProxy\SshProcessConnector('user@example.com', $loop);
$proxy = new Clue\React\SshProxy\SshSocksConnector('user@example.com', $loop);

// new (using default loop)
$proxy = new Clue\React\SshProxy\SshProcessConnector('user@example.com');
$proxy = new Clue\React\SshProxy\SshSocksConnector('user@example.com');

Builds on top of https://github.com/reactphp/event-loop/pull/226, https://github.com/reactphp/event-loop/pull/229, https://github.com/reactphp/event-loop/pull/232, https://github.com/reactphp/socket/pull/260 and https://github.com/friends-of-reactphp/mysql/pull/134