Re: Proxy Protocol support

Ken Murchison <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
On 1/29/23 11:44 PM, [email protected] wrote:
> Hello!
>
> Does Cyrus IMAP support proxy protocol?
> https://www.haproxy.com/blog/use-the-proxy-protocol-to-preserve-a-clients-ip-address/
> Unfortunately, I didn't find any mention in the Cyrus documentation.
>
> I would like to do SSL termination with HAProxy and be able to 
> preserve client addresses.
> Is it possible at the moment?


The short answer is that Cyrus doesn't currently support PROXY 
protocol.  However, having just read the spec, it doesn't appear that it 
would be hard to integrate.  At first glance, a command line option (or 
config parameter) would have to be added to signal that the service 
should expect to see the proxy protocol in use. Second, an extra 'proxy 
protocol' flag could be added to global.c:get_clienthost() to enable 
parsing the protocol/address info off of the wire rather than using 
getsockname() and getpeername().

Such a patch would most likely be gladly accepted.

-- 
Kenneth Murchison
Senior Software Developer
Fastmail US LLC


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/Tffd8ecb0c1686659-Mf9f9481ba046c2a9a23a454e
Delivery options: https://cyrus.topicbox.com/groups/info/subscription
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.