<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ranch.git/src, branch 1.7.1</title>
<subtitle>Socket acceptor pool for TCP protocols.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/'/>
<entry>
<title>Use the correct CRC32 algorithm for the PROXY header</title>
<updated>2018-11-26T10:52:27+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-11-26T10:52:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=0d9ad0a8445e7ba6e8bf9591257fa4457dda8321'/>
<id>0d9ad0a8445e7ba6e8bf9591257fa4457dda8321</id>
<content type='text'>
Turns out it wasn't the plain CRC32 algorithm that should have
been used, whoops!

The implementation was adapted from pseudo code from
Thomas Cioppettini.

I've renamed the PROXY header building option value for
checksum from crc32 to crc32c and updated the documentation.
There is no support for plain crc32 checksums.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out it wasn't the plain CRC32 algorithm that should have
been used, whoops!

The implementation was adapted from pseudo code from
Thomas Cioppettini.

I've renamed the PROXY header building option value for
checksum from crc32 to crc32c and updated the documentation.
There is no support for plain crc32 checksums.
</pre>
</div>
</content>
</entry>
<entry>
<title>Document the PROXY-related functions; prepare 1.7.0</title>
<updated>2018-11-14T09:55:23+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-11-14T09:55:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=2f502078fd0f56e3e61e58f1d57ae15f9f736ffe'/>
<id>2f502078fd0f56e3e61e58f1d57ae15f9f736ffe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ranch:recv_proxy_header/2</title>
<updated>2018-10-23T10:10:53+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-10-23T10:10:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=d2720842a63dc7bc6ac01d9e2866bfa78cb39aa5'/>
<id>d2720842a63dc7bc6ac01d9e2866bfa78cb39aa5</id>
<content type='text'>
This is the function that should be called regardless of
TCP or TLS being used. The proper usage for this function is:

{ok, ProxyInfo} = ranch:recv_proxy_header(Ref, Timeout),
{ok, Socket} = ranch:handshake(Ref),
...

Ranch takes care of everything else under the hood. Transports
now need to have a Transport:recv_proxy_header/2 function. For
ranch_ssl the function gets the port from the sslsocket() record
and then calls ranch_tcp:recv_proxy_header/2 with it.

This means that two undocumented features are currently used for
this, but the interface is really nice so that's a sacrifice
worth doing. Also worth noting is that OTP 22 should have an
alternative for gen_tcp:unrecv/2 so the only real issue is about
the sslsocket() record at the moment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the function that should be called regardless of
TCP or TLS being used. The proper usage for this function is:

{ok, ProxyInfo} = ranch:recv_proxy_header(Ref, Timeout),
{ok, Socket} = ranch:handshake(Ref),
...

Ranch takes care of everything else under the hood. Transports
now need to have a Transport:recv_proxy_header/2 function. For
ranch_ssl the function gets the port from the sslsocket() record
and then calls ranch_tcp:recv_proxy_header/2 with it.

This means that two undocumented features are currently used for
this, but the interface is really nice so that's a sacrifice
worth doing. Also worth noting is that OTP 22 should have an
alternative for gen_tcp:unrecv/2 so the only real issue is about
the sslsocket() record at the moment.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a race condition on restart after listener_sup crash</title>
<updated>2018-10-10T14:22:19+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-10-10T14:22:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=7d3c65a6db5e267eb0a3f2503c9fa1264b559e73'/>
<id>7d3c65a6db5e267eb0a3f2503c9fa1264b559e73</id>
<content type='text'>
The race condition occurs when the restart is faster than
the cleaning up. With this commit the restart will perform
the cleanup if it was not done beforehand.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The race condition occurs when the restart is faster than
the cleaning up. With this commit the restart will perform
the cleanup if it was not done beforehand.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the acceptors exit rather than crash on socket close</title>
<updated>2018-10-10T11:39:31+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-10-10T11:36:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=2b8ef9b606381f4e5912f815cdf0d5accf00409f'/>
<id>2b8ef9b606381f4e5912f815cdf0d5accf00409f</id>
<content type='text'>
This will avoid some unnecessary logs by default.
SASL can be enabled to log these events.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will avoid some unnecessary logs by default.
SASL can be enabled to log these events.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ranch_tcp:recv_proxy_header/2</title>
<updated>2018-10-10T09:55:50+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-10-10T09:54:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=4b9970bcd725972dbd845e07c34a8ef8409ec04c'/>
<id>4b9970bcd725972dbd845e07c34a8ef8409ec04c</id>
<content type='text'>
This uses the undocumented function gen_tcp:unrecv/2.

Tests have been added for both gen_tcp and ssl connections,
including sending data in the same first packet, at least
for gen_tcp (ssl tests may or may not end up buffering some
of the TLS handshake before the recv call, but there's no
guarantees).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses the undocumented function gen_tcp:unrecv/2.

Tests have been added for both gen_tcp and ssl connections,
including sending data in the same first packet, at least
for gen_tcp (ssl tests may or may not end up buffering some
of the TLS handshake before the recv call, but there's no
guarantees).
</pre>
</div>
</content>
</entry>
<entry>
<title>Add functions to build the PROXY protocol header</title>
<updated>2018-10-09T14:59:20+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-10-09T14:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=1cc7de15b6f04835faa2f6505669cb7f90c29796'/>
<id>1cc7de15b6f04835faa2f6505669cb7f90c29796</id>
<content type='text'>
Also add tests of the type parse(build(Info)), including
for testing the TLVs and the padding/checksum verification
options.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also add tests of the type parse(build(Info)), including
for testing the TLVs and the padding/checksum verification
options.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add initial ranch_proxy_header implementation</title>
<updated>2018-10-08T14:05:04+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-10-08T14:05:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=1d6d695934278e7b8c6e1cbfaf56c0b735765a9a'/>
<id>1d6d695934278e7b8c6e1cbfaf56c0b735765a9a</id>
<content type='text'>
Using test cases from the spec and tomciopp/proxy_protocol.
Many more tests are needed, especially for the TLV part and
for the error conditions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using test cases from the spec and tomciopp/proxy_protocol.
Many more tests are needed, especially for the TLV part and
for the error conditions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix inconsistent naming of filter_user_options/2 argument</title>
<updated>2018-10-04T06:36:39+00:00</updated>
<author>
<name>Kim Shrier</name>
<email>gitkim@westryn.net</email>
</author>
<published>2018-10-04T06:25:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=6b974d4a50bbf6b811d74c15c845f511bd1cf1a6'/>
<id>6b974d4a50bbf6b811d74c15c845f511bd1cf1a6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean listener options after normal shutdown</title>
<updated>2018-09-17T11:54:02+00:00</updated>
<author>
<name>juhlig</name>
<email>j.uhlig@mailingwork.de</email>
</author>
<published>2018-09-13T13:07:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/ranch.git/commit/?id=fedc4af6432369850cb5e4b7aabfe0512ddfc5a5'/>
<id>fedc4af6432369850cb5e4b7aabfe0512ddfc5a5</id>
<content type='text'>
In addition to cleaning when ranch:stop_listener/1 is called, we
also need to clean when we detect the supervisor is going away
for normal reasons, because the supervisor might be in another
application's supervision tree.

Note that there might be a short delay in this case before the
cleanup is done, due to using monitors for detection.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In addition to cleaning when ranch:stop_listener/1 is called, we
also need to clean when we detect the supervisor is going away
for normal reasons, because the supervisor might be in another
application's supervision tree.

Note that there might be a short delay in this case before the
cleanup is done, due to using monitors for detection.
</pre>
</div>
</content>
</entry>
</feed>
