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

listen block missing tcp_request #75

Closed
quulah opened this issue May 5, 2018 · 8 comments
Closed

listen block missing tcp_request #75

quulah opened this issue May 5, 2018 · 8 comments

Comments

@quulah
Copy link
Contributor

quulah commented May 5, 2018

It's supported there, and also in backend, but this role seems to be missing a parameter for it.

I also noticed, that there's some differences between the template and the README.

The README says:

haproxy_frontend.{n}.tcp_request: [optional]: Perform an action on a new session depending on a layer 4-7 condition. (e.g. content captureparam req.ssl_sni len 50)

But the template has action, param and cond like in http_request:

  tcp-request {{ tcp_request.action }}{% if tcp_request.param is defined %} {{ tcp_request.param }}{% endif %}{% if tcp_request.cond is defined %} {{ tcp_request.cond }}{% endif %}
@quulah
Copy link
Contributor Author

quulah commented May 5, 2018

I made a fork and was in the process of making some changes and a pull request, but I'm not sure how to handle the action, param and cond stuff.

If you look at the configuration for HAProxy, http-request and tcp-request differ a bit.

tcp-request has things like content and connection in the keyword, and then the action and condition.

Currently, the action would be content for example, which I think is a bit wrong.

@quulah
Copy link
Contributor Author

quulah commented May 5, 2018

If you follow the README, then it would just be a list of things and the template needs changing.

If you want to separate the actions, conditions and other parameters then both the README and template need some fixing.

:)

@tersmitten
Copy link
Member

I agree that the README is a bit cripple (and the implementation might be too :-)). Can you add a link of the tcp-request documentation. I'll try to have a look at it soon.

@quulah
Copy link
Contributor Author

quulah commented May 15, 2018 via email

@tersmitten
Copy link
Member

I guess there should be 4 separate options:

  • tcp-request connection
  • tcp-request content
  • tcp-request inspect-delay
  • tcp-request session

With corresponding arguments (e.g. action, condition, timeout).

@tersmitten
Copy link
Member

Can you add them where they're supported.

screenshot from 2018-05-15 22-19-38

And remove the general tcp_request?

@quulah
Copy link
Contributor Author

quulah commented May 16, 2018 via email

@quulah
Copy link
Contributor Author

quulah commented Jun 16, 2018

Finally got around to doing the changes. I added new variables tcp_request_content, tcp_request_connection, tcp_request_session and tcp_request_inspect_delay to the templates for listen, backend and frontend.

The variable names are a bit long, might also be a tcp_request dict, but tell me what you think. :)

@tersmitten tersmitten modified the milestones: 5.11.1, 5.13.0 Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants