SNI based routing using go network filter

17 views
Skip to first unread message

Amruth Premjith

unread,
Mar 26, 2026, 8:30:45 AM (10 days ago) Mar 26
to envoy-users
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")
...
}
Reply all
Reply to author
Forward
0 new messages