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

Expose Protocol identification API in Lua scripts #3704

Closed
ramaraochavali opened this issue Jun 23, 2018 · 4 comments
Closed

Expose Protocol identification API in Lua scripts #3704

ramaraochavali opened this issue Jun 23, 2018 · 4 comments
Labels
enhancement Feature requests. Not bugs or questions. help wanted Needs help!

Comments

@ramaraochavali
Copy link
Contributor

Description:
While it is possible to identify the type of protocol (H1/H2 etc) and whether TLS is used on a given request using c++ API in filters, Lua does not expose this. It would be useful to expose this information in Lua so that Lua filter can make some decisions.

@dio
Copy link
Member

dio commented Jun 23, 2018

@ramaraochavali for my own education, while the type of protocol can be inferred from RequestInfo, how to check whether TLS is being used in current request?

Probably I could extend the RequestInfo wrapper here #3627 to return the protocol (e.g. the API maybe something like: request_handle:requestInfo():protocol()) but not sure about the flag for TLS.

Is it from StreamDecoderFilterCallbacks::connection()?

@ramaraochavali
Copy link
Contributor Author

@dio yes. I think it is from this API https://github.com/envoyproxy/envoy/blob/master/include/envoy/network/connection.h#L182.
Are you actively working on the above PR?

@ramaraochavali
Copy link
Contributor Author

@dio sorry..I just checked the PR, looks like you are working actively on it. I will follow the PR on the progress,

@dio
Copy link
Member

dio commented Jun 23, 2018

😬yeah, it was stale a bit. Will try to cover this use-case too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Projects
None yet
Development

No branches or pull requests

3 participants