Add support for HA Proxy Protocol TLV's#5972
Add support for HA Proxy Protocol TLV's#5972damianorenfer wants to merge 1 commit intoeclipse-vertx:masterfrom
Conversation
|
I'd rather expose that has a Map<Buffer, Buffer> instead (that map can be ordered if needed) |
TLV's are supported in netty, but currently not accessible to vert.x users. Here the TLV's are exposed in `NetSocket#tlvs`
87477f4 to
c40907d
Compare
|
Sure, I just updated the code accordingly |
| * the value contains the TLV value, mainly used for HA Proxy Protocol v2 | ||
| */ | ||
| @GenIgnore() | ||
| Map<Buffer, Buffer> tlvs(); |
There was a problem hiding this comment.
why do we need that ? Quic does not yet support proxying at the moment and we are not sure it makes sense
There was a problem hiding this comment.
that seems at the moment to be a TCP concern only
There was a problem hiding this comment.
Do you see a better place to put this one ? The goal is to access TLV's in NetServer#connectHandler
There was a problem hiding this comment.
sorry, it is fine here, I meant actually on QuicConnection it should apply to.
| * the value contains the TLV value, mainly used for HA Proxy Protocol v2 | ||
| */ | ||
| @GenIgnore() | ||
| Map<Buffer, Buffer> tlvs(); |
There was a problem hiding this comment.
this should return null when it does not apply, e.g. HTTP/3
|
The protocol technically allows for multiple occurrences of TLVs with the same type. It's probably not that common, but I am wondering if it makes sense to add unnecessary constraints. The underlying Netty decoder also uses a List, presumably for that reason. |
@vietj I was also not able to find anything about TLV uniqueness based on type here. |
| * the value contains the TLV value, mainly used for HA Proxy Protocol v2 | ||
| */ | ||
| @GenIgnore() | ||
| Map<Buffer, Buffer> tlvs(); |
There was a problem hiding this comment.
| Map<Buffer, Buffer> tlvs(); | |
| default Map<Buffer, Buffer> tlvs() { | |
| return Map.of(); | |
| } |
| /** | ||
| * @return the type-length-values present in the TCP header as map where the key contains the TLV type and |
There was a problem hiding this comment.
| /** | |
| * @return the type-length-values present in the TCP header as map where the key contains the TLV type and |
Motivation:
TLV's are supported in netty, but currently not accessible to vert.x users.
Here the TLV's are exposed in
NetSocket#tlvsThis also answers to #5452
Conformance:
ECA signed