Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle PROXY protocol support on/off #70

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

minorOffense
Copy link

Add an option for varnish to recognize the PROXY protocol. Allows a setup similar to https://feryn.eu/blog/varnish-4-1-haproxy-get-the-real-ip-by-leveraging-proxy-protocol-support/

This adds a boolean option which will add the ',PROXY' string to the end of the port definition.

@NITEMAN
Copy link
Contributor

NITEMAN commented Jan 24, 2022

@minorOffense PROXY protocol is already supported, we have been using something like this on hiera for ages:

varnish::listen:
  - '0.0.0.0:6081'
  - '0.0.0.0:6083,PROXY'

IMHO adding that option makes the module less flexible

@minorOffense
Copy link
Author

It doesn't work if you use listen addr and port separately. You end up having to build the config string by hand (like in your example). The boolean just makes it more convenient and works with the other options independently.

@NITEMAN
Copy link
Contributor

NITEMAN commented Jan 25, 2022

Maybe I'm wrong, but if the new parameter is set to true it applies to every item on varnish::listen... I think at least parameter documentation should state it clearly (something like "Boolean toggle for conveniently appending ,PROXY to all items on $listen" instead of "Boolean toggle support for the PROXY protocol.")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants