This commit is contained in:
2022-10-23 01:39:27 +02:00
parent 8c17aab483
commit 1929b84685
4130 changed files with 479334 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<?php
use Clue\React\Socks\Server;
use React\Socket\Server as Socket;
require __DIR__ . '/../vendor/autoload.php';
$loop = React\EventLoop\Factory::create();
// listen on 127.0.0.1:1080 or first argument
$listen = isset($argv[1]) ? $argv[1] : '127.0.0.1:1080';
$socket = new Socket($listen, $loop);
// start a new server listening for incoming connection on the given socket
$server = new Server($loop, $socket);
echo 'SOCKS server listening on ' . $socket->getAddress() . PHP_EOL;
$loop->run();