diff --git a/example/echo/echo.go b/example/echo/echo.go index 0f39c1270..44a93103f 100644 --- a/example/echo/echo.go +++ b/example/echo/echo.go @@ -49,7 +49,11 @@ func echoServer() error { } func clientMain() error { - session, err := quic.DialAddr(addr, &tls.Config{InsecureSkipVerify: true}, nil) + tlsConf := &tls.Config{ + InsecureSkipVerify: true, + NextProtos: []string{"quic-echo-example"}, + } + session, err := quic.DialAddr(addr, tlsConf, nil) if err != nil { return err } @@ -101,5 +105,8 @@ func generateTLSConfig() *tls.Config { if err != nil { panic(err) } - return &tls.Config{Certificates: []tls.Certificate{tlsCert}} + return &tls.Config{ + Certificates: []tls.Certificate{tlsCert}, + NextProtos: []string{"quic-echo-example"}, + } }