| 1 |
[appendix] |
| 2 |
== Migrating from Ranch 2.1 to Ranch 2.2 |
| 3 |
|
| 4 |
Ranch 2.2 is a maintenance release containing a small number |
| 5 |
of fixes and improvements. |
| 6 |
|
| 7 |
Ranch 2.2 is tested with Erlang/OTP 24.0 onward, although it |
| 8 |
should be compatible with Erlang/OTP 22.0 and above. |
| 9 |
|
| 10 |
=== Features added |
| 11 |
|
| 12 |
* `DTLS` is now supported. |
| 13 |
|
| 14 |
* The `certs_keys` option from `ssl` is now accepted |
| 15 |
and documented. |
| 16 |
|
| 17 |
* The `UNIQUE_ID` PROXY protocol header extension is |
| 18 |
now supported. |
| 19 |
|
| 20 |
* The `ranch_transport` behavior has a new callback |
| 21 |
`format_error/1` which allows finer grained formatting |
| 22 |
of Ranch's error messages. The callback is currently |
| 23 |
optional and will become required in Ranch 3.0. |
| 24 |
|
| 25 |
=== Changed behaviors |
| 26 |
|
| 27 |
* Ranch will now obfuscate certificates, keys and passwords |
| 28 |
in the error message produced on listen error. |
| 29 |
|
| 30 |
* The exception reason when a connection process has failed |
| 31 |
its handshake has been changed to `{shutdown, {Reason, PeerInfo}}` |
| 32 |
where `PeerInfo` contains the peer name when available. |
| 33 |
|
| 34 |
* The `{packet, raw}` socket option is no longer set explicitly, |
| 35 |
as this is already the default value. |
| 36 |
|
| 37 |
=== Bugs fixed |
| 38 |
|
| 39 |
* `ranch:stop_listener/1` will now return an error instead |
| 40 |
of throwing an exception when the listener does not exist. |
| 41 |
|
| 42 |
* Fix `ranch:recv_proxy_header/2` for the upcoming Erlang/OTP 28. |
| 43 |
|
| 44 |
* Ensure that a user crash while stopping a listener does |
| 45 |
not prevent a subsequent attempt to stop it. |
| 46 |
|
| 47 |
* Alarm option `threshold` was mispelled in Ranch 2.1. This |
| 48 |
has been corrected. The wrong spelling `treshold` is still |
| 49 |
accepted and will be removed in Ranch 3.0. |