ranch_proxy_header:to_connection_info(3)

Name

ranch_proxy_header:to_connection_info - Convert proxy_info() to ssl:connection_info()

Description

to_connection_info(ProxyInfo :: proxy_info())
    -> ssl:connection_info()

Convert ranch_proxy_header:proxy_info() information to the ssl:connection_info() format returned by ssl:connection_information/1,2.

Arguments

ProxyInfo

The PROXY protocol information.

Return value

Connection information is returned as a proplist.

Because the PROXY protocol header includes limited information, only the keys protocol, selected_cipher_suite and sni_hostname will be returned, at most. All keys are optional.

Changelog

  • 2.1: Function introduced.

Examples

Convert the PROXY protocol information
ConnInfo = ranch_proxy_header:to_connection_info(ProxyInfo).

See also

ranch_proxy_header:parse(3), ranch_proxy_header(3)

Ranch 2.1 Function Reference

Navigation

Version select

Like my work? Donate!

Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.