File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121//$client->setProtocolVersion(5);
2222// $client->setAuth('test','test');
2323
24+ echo 'Demo SOCKS client connecting to SOCKS server 127.0.0.1:9051 ' . PHP_EOL ;
25+
2426function ex (Exception $ exception =null )
2527{
2628 if ($ exception !== null ) {
Original file line number Diff line number Diff line change 1818
1919$ server ->listen ('9051 ' ,'localhost ' );
2020
21+ echo 'SOCKS server listening on localhost:9051 (which forwards everything to SOCKS server 127.0.0.1:9050) ' . PHP_EOL ;
22+
2123$ loop ->run ();
Original file line number Diff line number Diff line change 11<?php
22
3- use React \Socket \Connection ;
4-
53include_once __DIR__ .'/../vendor/autoload.php ' ;
64
75$ loop = React \EventLoop \Factory::create ();
1715 'user ' => 'p@ssw0rd '
1816));
1917
20- $ server ->on ('ready ' , function (Connection $ connection ) {
21-
22- });
18+ echo 'SOCKS server listening on localhost:9050 ' . PHP_EOL ;
2319
2420$ loop ->run ();
You can’t perform that action at this time.
0 commit comments