func MatchByProtocol(protocols ...common.Protocol) MatchFunc {
	m := make(map[common.Protocol]struct{})
	for _, v := range protocols {
		m[v] = struct{}{}
	}
	return func(sni, alpn string) bool {
		_, ok := m[common.Protocol(alpn)]
		return ok
	}
}
// MatchByProtocol creates match function based on client TLS ALPN protocol.
MatchByProtocol creates match function based on client TLS ALPN protocol.
// MatchByProtocol creates match function based on client TLS ALPN protocol .
func MatchByProtocol(protocols ...common.Protocol) MatchFunc {
	m := make(map[common.Protocol]struct{})
	for _, v := range protocols {
		m[v] = struct{}{}
	}
	return func(sni, alpn string) bool {
		_, ok := m[common.Protocol(alpn)]
		return ok
	}
}
func MatchByProtocol ( protocols ... common . Protocol ) MatchFunc { m := make ( map [ common . Protocol ] struct { } ) for _ , v := range protocols { m [ v ] = struct { } { } } return func ( sni , alpn string ) bool { _ , ok := m [ common . Protocol ( alpn ) ] return ok } }
MatchByProtocol creates match function based on client TLS ALPN protocol.
MatchByProtocol creates match function based on client TLS ALPN protocol .