feat: enable webstransport

This commit is contained in:
Richard Ramos 2023-04-14 12:32:03 -04:00 committed by RichΛrd
parent 8af789bb63
commit e74f60f173

View File

@ -22,6 +22,7 @@ import (
"github.com/libp2p/go-libp2p/p2p/net/connmgr" "github.com/libp2p/go-libp2p/p2p/net/connmgr"
quic "github.com/libp2p/go-libp2p/p2p/transport/quic" quic "github.com/libp2p/go-libp2p/p2p/transport/quic"
"github.com/libp2p/go-libp2p/p2p/transport/tcp" "github.com/libp2p/go-libp2p/p2p/transport/tcp"
libp2pwebtransport "github.com/libp2p/go-libp2p/p2p/transport/webtransport"
"github.com/multiformats/go-multiaddr" "github.com/multiformats/go-multiaddr"
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr/net" manet "github.com/multiformats/go-multiaddr/net"
@ -473,6 +474,7 @@ var DefaultLibP2POptions = []libp2p.Option{
libp2p.ChainOptions( libp2p.ChainOptions(
libp2p.Transport(tcp.NewTCPTransport), libp2p.Transport(tcp.NewTCPTransport),
libp2p.Transport(quic.NewTransport), libp2p.Transport(quic.NewTransport),
libp2p.Transport(libp2pwebtransport.New),
), ),
libp2p.UserAgent(userAgent), libp2p.UserAgent(userAgent),
libp2p.ChainOptions( libp2p.ChainOptions(