Hi team,
I was trying to implement a go network filter to implement an SNI based routing logic for TLS requests but I can't seem to get the hostname from the incoming request.
This is the code I'm using and I've tried multiple filterStates but nothing seems to be returning anything.
Could you please advise if I'm using the wrong FilterState name or something?
Thanks!
type sniFilter struct {
cb api.ConnectionCallback
upFilter *upFilter
}
func (f *sniFilter) OnNewConnection() api.FilterStatus {
sni := f.cb.StreamInfo().FilterState().GetString("envoy.network.upstream_server_name")
...
}