-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from clue-labs/docs
Minor documentation improvements
- Loading branch information
Showing
12 changed files
with
89 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?php | ||
|
||
// A simple example which runs a SOCKS proxy server. | ||
// The listen address can be given as first argument and defaults to localhost:1080 otherwise. | ||
// The listen address can be given as first argument and defaults to 127.0.0.1:1080 otherwise. | ||
// | ||
// See also examples #12 and #14 for the client side. | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
// start a new SOCKS proxy server | ||
$server = new Clue\React\Socks\Server(); | ||
$socks = new Clue\React\Socks\Server(); | ||
|
||
// listen on 127.0.0.1:1080 or first argument | ||
$socket = new React\Socket\SocketServer(isset($argv[1]) ? $argv[1] : '127.0.0.1:1080'); | ||
$server->listen($socket); | ||
$socks->listen($socket); | ||
|
||
echo 'SOCKS server listening on ' . $socket->getAddress() . PHP_EOL; |
Oops, something went wrong.