File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,8 +237,8 @@ HTTP operates on a higher layer than this low-level SOCKS implementation.
237237If you want to issue HTTP requests, you can add a dependency for
238238[ clue/reactphp-buzz] ( https://github.com/clue/reactphp-buzz ) .
239239It can interact with this library by issuing all
240- [ http requests through a SOCKS server] ( https://github.com/clue/reactphp-buzz#socks-proxy ) .
241- This works for both plain HTTP and SSL encrypted HTTPS requests.
240+ [ HTTP requests through a SOCKS proxy server] ( https://github.com/clue/reactphp-buzz#socks-proxy ) .
241+ This works for both plain HTTP and TLS- encrypted HTTPS requests.
242242
243243#### Protocol version
244244
Original file line number Diff line number Diff line change 11<?php
22
3+ // A simple example which requests http://www.google.com/ through a SOCKS proxy.
4+ // The proxy can be given as first argument and defaults to localhost:1080 otherwise.
5+ //
6+ // Not already running a SOCKS proxy server? See also example #11 or try this: `ssh -D 1080 localhost`
7+ //
8+ // For illustration purposes only. If you want to send HTTP requests in a real
9+ // world project, take a look at https://github.com/clue/reactphp-buzz#socks-proxy
10+
311use Clue \React \Socks \Client ;
412use React \Socket \Connector ;
513use React \Socket \ConnectionInterface ;
Original file line number Diff line number Diff line change 11<?php
22
3+ // A simple example which requests https://www.google.com/ through a SOCKS proxy.
4+ // The proxy can be given as first argument and defaults to localhost:1080 otherwise.
5+ //
6+ // Not already running a SOCKS proxy server? See also example #11 or try this: `ssh -D 1080 localhost`
7+ //
8+ // For illustration purposes only. If you want to send HTTP requests in a real
9+ // world project, take a look at https://github.com/clue/reactphp-buzz#socks-proxy
10+
311use Clue \React \Socks \Client ;
412use React \Socket \Connector ;
513use React \Socket \ConnectionInterface ;
Original file line number Diff line number Diff line change 11<?php
22
3+ // A more advanced example which requests http://www.google.com/ through a chain of SOCKS proxy servers.
4+ // The proxy servers can be given as arguments.
5+ //
6+ // Not already running a SOCKS proxy server? See also example #11 or try this: `ssh -D 1080 localhost`
7+ //
8+ // For illustration purposes only. If you want to send HTTP requests in a real
9+ // world project, take a look at https://github.com/clue/reactphp-buzz#socks-proxy
10+
311use Clue \React \Socks \Client ;
412use React \Socket \Connector ;
513use React \Socket \ConnectionInterface ;
Original file line number Diff line number Diff line change 11<?php
22
3+ // A simple example which requests https://www.google.com/ through a SOCKS proxy with local DNS resolution.
4+ // The proxy can be given as first argument and defaults to localhost:1080 otherwise.
5+ //
6+ // Not already running a SOCKS proxy server? See also example #11 or try this: `ssh -D 1080 localhost`
7+ //
8+ // For illustration purposes only. If you want to send HTTP requests in a real
9+ // world project, take a look at https://github.com/clue/reactphp-buzz#socks-proxy
10+
311use Clue \React \Socks \Client ;
412use React \Socket \Connector ;
513use React \Socket \ConnectionInterface ;
Original file line number Diff line number Diff line change 11<?php
22
3+ // A simple example which runs a SOCKS proxy server.
4+ // The listen address can be given as first argument and defaults to localhost:1080 otherwise.
5+ //
6+ // See also examples #01 and #02 for the client side.
7+
38use Clue \React \Socks \Server ;
49use React \Socket \Server as Socket ;
510
Original file line number Diff line number Diff line change 11<?php
22
3+ // A simple example which runs a SOCKS proxy server with hard-coded authentication details.
4+ // The listen address can be given as first argument and defaults to localhost:1080 otherwise.
5+ //
6+ // See also examples #01 and #02 for the client side.
7+ //
8+ // Note that the client examples do not pass any authentication details by default
9+ // and as such will fail to authenticate against this example server. You can
10+ // explicitly pass authentication details to the client example like this:
11+ //
12+ // $ php examples/01-http.php tom:god@localhost:1080
13+
314use Clue \React \Socks \Server ;
415use React \Socket \Server as Socket ;
516
Original file line number Diff line number Diff line change 11<?php
22
3- // A SOCKS server that rejects connections to some domains (blacklist / filtering)
3+ // A more advanced example which runs a SOCKS proxy server that rejects connections
4+ // to some domains (blacklist /filtering).
5+ // The listen address can be given as first argument and defaults to localhost:1080 otherwise.
6+ //
7+ // See also examples #01 and #02 for the client side.
8+ // Client example #01 is expected to fail because port 80 is blocked in this server example.
9+ // Client example #02 is expected to succceed because it is not blacklisted.
410
511use React \EventLoop \Factory as LoopFactory ;
612use ConnectionManager \Extra \Multiple \ConnectionManagerSelective ;
Original file line number Diff line number Diff line change 11<?php
22
3- // A SOCKS server that forwards (proxy chaining) to other SOCKS servers
3+ // A more advanced example which runs a SOCKS proxy server that forwards to
4+ // other SOCKS servers (proxy chaining).
5+ // The listen address can be given as first argument.
6+ // The upstream proxy servers can be given as additional arguments.
7+ //
8+ // See also examples #01 and #02 for the client side.
49
510use Clue \React \Socks \Client ;
611use Clue \React \Socks \Server ;
Original file line number Diff line number Diff line change 11<?php
22
3- // A SOCKS server that randomly forwards (proxy chaining) to a pool of SOCKS servers
3+ // A more advanced example which runs a SOCKS proxy server that randomly forwards
4+ // to a pool of SOCKS servers (random proxy chaining).
5+ // The listen address can be given as first argument.
6+ // The upstream proxy servers can be given as additional arguments.
7+ //
8+ // See also examples #01 and #02 for the client side.
49
510use React \EventLoop \Factory as LoopFactory ;
611use ConnectionManager \Extra \Multiple \ConnectionManagerRandom ;
You can’t perform that action at this time.
0 commit comments