-
Notifications
You must be signed in to change notification settings - Fork 845
Description
We currently have 2 (3?) ways of configuring the ALPN strings:
- Via the ports configuration in records.config
- Via sni.yaml (H2 can be disabled)
- Via plugin APIs (I think ?)
This gets complicated, because the APIs around SSLNextProtocolSet, and cloning, adding and removing endpoints is expensive (lots of memory allocations). The code currently uses global "override" map for each accept port, to hold sni.yaml configurable versions of each ALPN mapping.
Bryan suggests maybe switching the internals to have some sort of bit-map / field for the protocol set members, rather than the strings. This gets a little complicated, since I believe the APIs here are generic and can support more than just the protocols defined for the ports specification. However, it would allow us to manipulate the bitfields, and have predefined SSLNextProtocolSet()'s for all possible versions.
This will also only get worse once we introduce H3 / QUIC, and possibly other protocols, and would need to be able to configure this via sni.yaml.