@clue clue released this Nov 20, 2018 · 2 commits to master since this release

Assets 2
  • First stable release, now following SemVer!

  • Feature / BC break: Unify SOCKS5 and SOCKS4(a) protocol version handling,
    the Client now defaults to SOCKS5 instead of SOCKS4a,
    remove explicit SOCKS4a handling and merge into SOCKS4 protocol handling and
    URI scheme socks5:// now only acts as an alias for default socks:// scheme.
    (#74, #81 and #87 by @clue)

    // old: defaults to SOCKS4a
    $client = new Client('127.0.0.1:1080', $connector);
    $client = new Client('socks://127.0.0.1:1080', $connector);
    
    // new: defaults to SOCKS5
    $client = new Client('127.0.0.1:1080', $connector);
    $client = new Client('socks://127.0.0.1:1080', $connector);
    
    // new: explicitly use legacy SOCKS4(a)
    $client = new Client('socks4://127.0.0.1:1080', $connector);
    
    // unchanged: explicitly use SOCKS5
    $client = new Client('socks5://127.0.0.1:1080', $connector);
  • Feature / BC break: Clean up Server interface,
    add Server::listen() method instead of accepting socket in constructor,
    replace Server::setAuth() with optional constructor parameter,
    remove undocumented "connection" event from Server and drop explicit Evenement dependency and
    mark all classes as final and all internal APIs as @internal
    (#78, #79, #80 and #84 by @clue)

    // old: socket passed to server constructor
    $socket = new React\Socket\Server(1080, $loop);
    $server = new Clue\React\Socks\Server($loop, $socket);
    
    // old: authentication via setAuthArray()/setAuth() methods
    $server = new Clue\React\Socks\Server($loop, $socket);
    $server->setAuthArray(array(
        'tom' => 'password',
        'admin' => 'root'
    ));
    
    // new: socket passed to listen() method
    $server = new Clue\React\Socks\Server($loop);
    $socket = new React\Socket\Server(1080, $loop);
    $server->listen($socket);
    
    // new: authentication passed to server constructor
    $server = new Clue\React\Socks\Server($loop, null, array(
        'tom' => 'password',
        'admin' => 'root'
    ));
    $server->listen($socket);
  • Feature: Improve error reporting for failed connections attempts by always including target URI in exceptions and
    improve promise cancellation and clean up any garbage references.
    (#82 and #83 by @clue)

    All error messages now always contain a reference to the remote URI to give
    more details which connection actually failed and the reason for this error.
    Similarly, any underlying connection issues to the proxy server will now be
    reported as part of the previous exception.

    For most common use cases this means that simply reporting the Exception
    message should give the most relevant details for any connection issues:

    $promise = $proxy->connect('tcp://example.com:80');
    $promise->then(function (ConnectionInterface $connection) {
        //
    }, function (Exception $e) {
        echo $e->getMessage();
    });
  • Improve documentation and examples, link to other projects and update project homepage.
    (#73, #75 and #85 by @clue)

@clue clue released this Dec 17, 2017 · 31 commits to master since this release

Assets 2
  • Feature: Support SOCKS over TLS (sockss:// URI scheme)
    (#70 and #71 by @clue)

    // new: now supports SOCKS over TLS
    $client = new Client('socks5s://localhost', $connector);
  • Feature: Support communication over Unix domain sockets (UDS)
    (#69 by @clue)

    // new: now supports SOCKS over Unix domain sockets (UDS)
    $client = new Client('socks5+unix:///tmp/proxy.sock', $connector);
  • Improve test suite by adding forward compatibility with PHPUnit 6
    (#68 by @clue)

@clue clue released this Sep 17, 2017 · 41 commits to master since this release

Assets 2

@clue clue released this Sep 1, 2017 · 44 commits to master since this release

Assets 2
  • Feature: Use socket error codes for connection rejections
    (#63 by @clue)

    $promise = $proxy->connect('imap.example.com:143');
    $promise->then(null, function (Exeption $e) {
        if ($e->getCode() === SOCKET_EACCES) {
            echo 'Failed to authenticate with proxy!';
        }
        throw $e;
    });
  • Feature: Report matching SOCKS5 error codes for server side connection errors
    (#62 by @clue)

  • Fix: Fix SOCKS5 client receiving destination hostnames and
    fix IPv6 addresses as hostnames for TLS certificates
    (#64 and #65 by @clue)

  • Improve test suite by locking Travis distro so new defaults will not break the build and
    optionally exclude tests that rely on working internet connection
    (#61 and #66 by @clue)

@clue clue released this Aug 2, 2017 · 62 commits to master since this release

Assets 2
  • Feature: Server now passes client source address to Connector
    (#60 by @clue)

@clue clue released this Jul 18, 2017 · 65 commits to master since this release

Assets 2
  • Feature: Pass full remote URI as parameter to authentication callback
    (#58 by @clue)

    // new third parameter passed to authentication callback
    $server->setAuth(function ($user, $pass, $remote) {
        $ip = parse_url($remote, PHP_URL_HOST);
        
        return ($ip === '127.0.0.1');
    });
  • Fix: Fix connecting to IPv6 address via SOCKS5 server and validate target
    URI so hostname can not contain excessive URI components
    (#59 by @clue)

  • Improve test suite by fixing HHVM build for now again and ignore future HHVM build errors
    (#57 by @clue)

@clue clue released this May 9, 2017 · 73 commits to master since this release

Assets 2
  • Feature: Forward compatibility with upcoming Socket v1.0 and v0.8
    (#56 by @clue)

@clue clue released this Apr 21, 2017 · 78 commits to master since this release

Assets 2
  • Update examples to use URIs with default port 1080 and accept proxy URI arguments
    (#54 by @clue)

  • Remove now unneeded dependency on react/stream
    (#55 by @clue)

@clue clue released this Apr 18, 2017 · 86 commits to master since this release

Assets 2
  • Feature: Merge Server class from clue/socks-server
    (#52 by @clue)

    $socket = new React\Socket\Server(1080, $loop);
    $server = new Clue\React\Socks\Server($loop, $socket);

    Upgrading from clue/socks-server?
    The classes have been moved as-is, so you can simply start using the new
    class name Clue\React\Socks\Server with no other changes required.

@clue clue released this Apr 14, 2017 · 122 commits to master since this release

Assets 2
  • Feature / BC break: Replace depreacted SocketClient with Socket v0.7 and
    use connect($uri) instead of create($host, $port)
    (#51 by @clue)

    // old
    $connector = new React\SocketClient\TcpConnector($loop);
    $client = new Client(1080, $connector);
    $client->create('google.com', 80)->then(function (Stream $conn) {
        $conn->write("");
    });
    
    // new
    $connector = new React\Socket\TcpConnector($loop);
    $client = new Client(1080, $connector);
    $client->connect('google.com:80')->then(function (ConnectionInterface $conn) {
        $conn->write("");
    });
  • Improve test suite by adding PHPUnit to require-dev
    (#50 by @clue)