Skip to content

Commit 5a67904

Browse files
committed
Prepare v1.4.0 release
1 parent f04365d commit 5a67904

File tree

2 files changed

+53
-10
lines changed

2 files changed

+53
-10
lines changed

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# Changelog
22

3+
## 1.4.0 (2018-10-30)
4+
5+
* Feature: Improve error reporting for failed connection attempts and improve
6+
cancellation forwarding during proxy connection setup.
7+
(#23 and #26 by @clue)
8+
9+
All error messages now always contain a reference to the remote URI to give
10+
more details which connection actually failed and the reason for this error.
11+
Similarly, any underlying connection issues to the proxy server will now be
12+
reported as part of the previous exception.
13+
14+
For most common use cases this means that simply reporting the `Exception`
15+
message should give the most relevant details for any connection issues:
16+
17+
```php
18+
$promise = $proxy->connect('tcp://example.com:80');
19+
$promise->then(function (ConnectionInterface $conn) use ($loop) {
20+
// …
21+
}, function (Exception $e) {
22+
echo $e->getMessage();
23+
});
24+
```
25+
26+
* Feature: Add support for custom HTTP request headers.
27+
(#25 by @valga and @clue)
28+
29+
```php
30+
// new: now supports custom HTTP request headers
31+
$proxy = new ProxyConnector('127.0.0.1:8080', $connector, array(
32+
'Proxy-Authentication' => 'Bearer abc123',
33+
'User-Agent' => 'ReactPHP'
34+
));
35+
```
36+
37+
* Fix: Fix connecting to IPv6 destination hosts.
38+
(#22 by @clue)
39+
40+
* Link to clue/reactphp-buzz for HTTP requests and update project homepage.
41+
(#21 and #24 by @clue)
42+
343
## 1.3.0 (2018-02-13)
444

545
* Feature: Support communication over Unix domain sockets (UDS)

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ conceal the origin address (anonymity) or to circumvent address blocking
99
(geoblocking). While many (public) HTTP CONNECT proxy servers often limit this
1010
to HTTPS port `443` only, this can technically be used to tunnel any
1111
TCP/IP-based protocol (HTTP, SMTP, IMAP etc.).
12-
This library provides a simple API to create these tunneled connection for you.
12+
This library provides a simple API to create these tunneled connections for you.
1313
Because it implements ReactPHP's standard
1414
[`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface),
1515
it can simply be used in place of a normal connector.
@@ -26,11 +26,11 @@ existing higher-level protocol implementation.
2626
ReactPHP's standard
2727
[`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface).
2828
* **Lightweight, SOLID design** -
29-
Provides a thin abstraction that is [*just good enough*](http://en.wikipedia.org/wiki/Principle_of_good_enough)
29+
Provides a thin abstraction that is [*just good enough*](https://en.wikipedia.org/wiki/Principle_of_good_enough)
3030
and does not get in your way.
3131
Builds on top of well-tested components and well-established concepts instead of reinventing the wheel.
3232
* **Good test coverage** -
33-
Comes with an automated tests suite and is regularly tested against actual proxy servers in the wild
33+
Comes with an automated tests suite and is regularly tested against actual proxy servers in the wild.
3434

3535
**Table of contents**
3636

@@ -230,7 +230,7 @@ $connector->connect('tcp://google.com:80')->then(function ($stream) {
230230

231231
See also any of the [examples](examples).
232232

233-
> Note how connection timeout is in fact entirely handled outside of this
233+
> Note how the connection timeout is in fact entirely handled outside of this
234234
HTTP CONNECT client implementation.
235235

236236
#### DNS resolution
@@ -256,7 +256,7 @@ However, wrapping the `ProxyConnector` in ReactPHP's
256256
[`Connector`](https://github.com/reactphp/socket#connector) actually
257257
performs local DNS resolution unless explicitly defined otherwise.
258258
Given that remote DNS resolution is assumed to be the preferred mode, all
259-
other examples explicitly disable DNS resoltion like this:
259+
other examples explicitly disable DNS resolution like this:
260260

261261
```php
262262
$connector = new Connector($loop, array(
@@ -269,7 +269,7 @@ If you want to explicitly use *local DNS resolution*, you can use the following
269269

270270
```php
271271
// set up Connector which uses Google's public DNS (8.8.8.8)
272-
$connector = Connector($loop, array(
272+
$connector = new Connector($loop, array(
273273
'tcp' => $proxy,
274274
'dns' => '8.8.8.8'
275275
));
@@ -319,7 +319,7 @@ you may simply pass an assoc array of additional request headers like this:
319319

320320
```php
321321
$proxy = new ProxyConnector('127.0.0.1:8080', $connector, array(
322-
'Proxy-Authentication' => 'Bearer abc123',
322+
'Proxy-Authorization' => 'Bearer abc123',
323323
'User-Agent' => 'ReactPHP'
324324
));
325325
```
@@ -385,11 +385,11 @@ $proxy = new ProxyConnector('http+unix://user:pass@/tmp/proxy.sock', $connector)
385385
The recommended way to install this library is [through Composer](https://getcomposer.org).
386386
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
387387

388-
This project follows [SemVer](http://semver.org/).
388+
This project follows [SemVer](https://semver.org/).
389389
This will install the latest supported version:
390390

391391
```bash
392-
$ composer require clue/http-proxy-react:^1.3
392+
$ composer require clue/http-proxy-react:^1.4
393393
```
394394

395395
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
@@ -423,7 +423,10 @@ $ php vendor/bin/phpunit --exclude-group internet
423423

424424
## License
425425

426-
MIT
426+
This project is released under the permissive [MIT license](LICENSE).
427+
428+
> Did you know that I offer custom development services and issuing invoices for
429+
sponsorships of releases and for contributions? Contact me (@clue) for details.
427430

428431
## More
429432

0 commit comments

Comments
 (0)