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

Access TLVs of Proxy Protocol v2 header from NetSocket #5452

Open
trnguyencflt opened this issue Jan 19, 2025 · 4 comments
Open

Access TLVs of Proxy Protocol v2 header from NetSocket #5452

trnguyencflt opened this issue Jan 19, 2025 · 4 comments
Milestone

Comments

@trnguyencflt
Copy link

trnguyencflt commented Jan 19, 2025

Describe the feature

Ability to read TLVs of Proxy Protocol header from NetSocket. To be more clear, in HAProxyMessageCompletionHandler#decode function, we only use HAProxyMessage msg only for overriding remote address and local address, however, in some use case, there are information in the proxy protocol header that are store in List<HAProxyTLV> tlvs of msg that are needed. Currently there is not a way to access that data when enabling proxy protocol in NetServerOptions of NetServer

@vietj
Copy link
Member

vietj commented Jan 20, 2025

I see, you could like to access those info from the NetSocket ?

@vietj vietj modified the milestones: 5.0.0, 5.1.0 Jan 20, 2025
@trnguyencflt
Copy link
Author

I see, you could like to access those info from the NetSocket ?

Yes, NetSocket is created from NetServer (in #connectHandler), when NetServer is init with proxy protocol enabled then there should be a way to access proxy protocol data, the current way of getting only remote/local address isn't sufficient for all use cases. Thanks

@vietj
Copy link
Member

vietj commented Jan 20, 2025

so in practice a map would be sufficient

@trnguyencflt
Copy link
Author

trnguyencflt commented Jan 20, 2025

so in practice a map would be sufficient

Not sure if I fully understand this, TLVs are represented as a list in HAProxyMessage (of netty), could you explain more how the map works here? Thanks.

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