aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_proxy_header.erl
AgeCommit message (Collapse)Author
2018-11-26Use the correct CRC32 algorithm for the PROXY headerLoïc Hoguin
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.
2018-10-09Add functions to build the PROXY protocol headerLoïc Hoguin
Also add tests of the type parse(build(Info)), including for testing the TLVs and the padding/checksum verification options.
2018-10-08Add initial ranch_proxy_header implementationLoïc Hoguin
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.