File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ secure HTTPS request to google.com through a remote SSH server:
7979
8080require __DIR__ . '/vendor/autoload.php';
8181
82- $proxy = new Clue\React\SshProxy\SshProcessConnector ('alice@example.com');
82+ $proxy = new Clue\React\SshProxy\SshSocksConnector ('alice@example.com');
8383
8484$connector = new React\Socket\Connector(array(
8585 'tcp' => $proxy,
@@ -404,7 +404,7 @@ $connection->query('SELECT * FROM book')->then(
404404$connection->quit();
405405```
406406
407- See also [ example #21 ] ( examples ) for more details.
407+ See also [ example #31 ] ( examples ) for more details.
408408
409409This example will automatically launch the ` ssh ` client binary to create the
410410connection to a database server that can not otherwise be accessed from the
Original file line number Diff line number Diff line change 11<?php
22
3- // A simple example which uses an HTTP client to requesthttps ://example.com/ through an SSH proxy server.
3+ // A simple example which uses an HTTP client to request https ://example.com/ through an SSH proxy server.
44// The proxy can be given through the SSH_PROXY env and defaults to localhost otherwise.
55//
66// You can assign the SSH_PROXY environment and prefix this with a space to make
1313
1414$ url = getenv ('SSH_PROXY ' ) !== false ? getenv ('SSH_PROXY ' ) : 'alice@localhost ' ;
1515
16- $ proxy = new Clue \React \SshProxy \SshProcessConnector ($ url );
16+ $ proxy = new Clue \React \SshProxy \SshSocksConnector ($ url );
1717
1818$ connector = new React \Socket \Connector (array (
1919 'tcp ' => $ proxy ,
Original file line number Diff line number Diff line change 1414// SSH_PROXY environment given? use this as the proxy URL
1515$ connector = null ;
1616if (getenv ('SSH_PROXY ' ) !== false ) {
17- $ proxy = new Clue \React \SshProxy \SshProcessConnector (getenv ('SSH_PROXY ' ));
17+ $ proxy = new Clue \React \SshProxy \SshSocksConnector (getenv ('SSH_PROXY ' ));
1818
1919 $ connector = new React \Socket \Connector (array (
2020 'tcp ' => $ proxy ,
Original file line number Diff line number Diff line change 2020
2121// SSH_PROXY environment given? use this as the proxy URL
2222if (getenv ('SSH_PROXY ' ) !== false ) {
23- $ proxy = new Clue \React \SshProxy \SshProcessConnector (getenv ('SSH_PROXY ' ));
23+ $ proxy = new Clue \React \SshProxy \SshSocksConnector (getenv ('SSH_PROXY ' ));
2424
2525 $ connector = new React \Socket \Connector (array (
2626 'tcp ' => $ proxy ,
You can’t perform that action at this time.
0 commit comments