diff --git a/config/config.go b/config/config.go index 843566c10d..a14c61bc8f 100644 --- a/config/config.go +++ b/config/config.go @@ -135,30 +135,49 @@ func (cfg *Config) makeSwarm() (*swarm.Swarm, error) { return swarm.NewSwarm(pid, cfg.Peerstore, swarm.WithMetrics(cfg.Reporter), swarm.WithConnectionGater(cfg.ConnectionGater)) } -func (cfg *Config) addTransports(h host.Host) (err error) { +func (cfg *Config) addTransports(h host.Host) error { swrm, ok := h.Network().(transport.TransportNetwork) if !ok { // Should probably skip this if no transports. return fmt.Errorf("swarm does not support transports") } - upgrader := new(tptu.Upgrader) - upgrader.PSK = cfg.PSK - upgrader.ConnGater = cfg.ConnectionGater + + var negotiatingMuxer tptu.Upgrader + var numSecureTransports int if cfg.Insecure { - upgrader.Secure = makeInsecureTransport(h.ID(), cfg.PeerKey) + negotiatingMuxer.SecureMuxer = makeInsecureTransport(h.ID(), cfg.PeerKey) + numSecureTransports = 1 } else { - upgrader.Secure, err = makeSecurityMuxer(h, cfg.SecurityTransports) + var err error + negotiatingMuxer.SecureMuxer, err = makeSecurityMuxer(h, cfg.SecurityTransports) if err != nil { return err } + numSecureTransports = len(cfg.SecurityTransports) } - upgrader.Muxer, err = makeMuxer(h, cfg.Muxers) + upgraders := make([]*tptu.Upgrader, 1, 1+numSecureTransports) + upgraders[0] = &negotiatingMuxer + for _, st := range cfg.SecurityTransports { + t, err := st.SecC(h) + if err != nil { + return err + } + upgraders = append(upgraders, &tptu.Upgrader{SecureTransport: t}) + } + + muxer, err := makeMuxer(h, cfg.Muxers) if err != nil { return err } - tpts, err := makeTransports(h, upgrader, cfg.ConnectionGater, cfg.Transports) + for _, u := range upgraders { + u.PSK = cfg.PSK + u.Muxer = muxer + u.ConnGater = cfg.ConnectionGater + } + + tpts, err := makeTransports(h, upgraders, cfg.ConnectionGater, cfg.Transports) if err != nil { return err } @@ -169,12 +188,12 @@ func (cfg *Config) addTransports(h host.Host) (err error) { } if cfg.Relay { - if err := circuitv2.AddTransport(h, upgrader); err != nil { + // TODO: figure out how to deal with security-enabled address and circuits + if err := circuitv2.AddTransport(h, &negotiatingMuxer); err != nil { h.Close() return err } } - return nil } diff --git a/config/constructor_types.go b/config/constructor_types.go index 3374786e65..3ccabb9542 100644 --- a/config/constructor_types.go +++ b/config/constructor_types.go @@ -41,7 +41,7 @@ var argTypes = map[reflect.Type]constructor{ hostType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return h }, networkType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return h.Network() }, muxType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return u.Muxer }, - securityType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return u.Secure }, + securityType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return u.SecureMuxer }, pskType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return u.PSK }, connGaterType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return cg }, peerIDType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return h.ID() }, diff --git a/config/transport.go b/config/transport.go index 9f55838db6..1e825e396d 100644 --- a/config/transport.go +++ b/config/transport.go @@ -56,14 +56,16 @@ func TransportConstructor(tpt interface{}) (TptC, error) { }, nil } -func makeTransports(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater, tpts []TptC) ([]transport.Transport, error) { - transports := make([]transport.Transport, len(tpts)) - for i, tC := range tpts { - t, err := tC(h, u, cg) - if err != nil { - return nil, err +func makeTransports(h host.Host, upgraders []*tptu.Upgrader, cg connmgr.ConnectionGater, tpts []TptC) ([]transport.Transport, error) { + transports := make([]transport.Transport, 0, len(tpts)*len(upgraders)) + for _, tC := range tpts { + for _, u := range upgraders { + t, err := tC(h, u, cg) + if err != nil { + return nil, err + } + transports = append(transports, t) } - transports[i] = t } return transports, nil } diff --git a/examples/go.mod b/examples/go.mod index 87e9cdf3d4..7b5abde1e0 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -9,13 +9,13 @@ require ( github.com/ipfs/go-log/v2 v2.3.0 github.com/libp2p/go-libp2p v0.14.4 github.com/libp2p/go-libp2p-connmgr v0.2.4 - github.com/libp2p/go-libp2p-core v0.10.0 + github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 github.com/libp2p/go-libp2p-discovery v0.5.1 github.com/libp2p/go-libp2p-kad-dht v0.13.0 - github.com/libp2p/go-libp2p-noise v0.3.0 - github.com/libp2p/go-libp2p-swarm v0.6.0 - github.com/libp2p/go-libp2p-tls v0.3.0 - github.com/multiformats/go-multiaddr v0.4.0 + github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697 + github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140 + github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca + github.com/multiformats/go-multiaddr v0.4.1 ) // Ensure that examples always use the go-libp2p version in the same git checkout. diff --git a/examples/go.sum b/examples/go.sum index 7347ae5620..f90bd1b1cc 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -439,7 +439,7 @@ github.com/libp2p/go-libp2p-autonat v0.5.0 h1:/+3+4NcQV47DQ/duvRyFDP8oxv6CQTvSKY github.com/libp2p/go-libp2p-autonat v0.5.0/go.mod h1:085tmmuXn0nXgFwuF7a2tt4UxgTjuapbuml27v4htKY= github.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk= github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= -github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= +github.com/libp2p/go-libp2p-circuit v0.4.1-0.20210921174845-5bf9f8e3f668/go.mod h1:0+O0YpceOlau8d1dUckSr8G5jVsbrQWYC20xzmvS0GA= github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= @@ -460,11 +460,11 @@ github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJB github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.2/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM= -github.com/libp2p/go-libp2p-core v0.9.0/go.mod h1:ESsbz31oC3C1AvMJoGx26RTuCkNhmkSRCqZ0kQtJ2/8= -github.com/libp2p/go-libp2p-core v0.10.0 h1:jFy7v5Muq58GTeYkPhGzIH8Qq4BFfziqc0ixPd/pP9k= github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210920171028-61a54c107072/go.mod h1:Ac52V2PMajsRlNG09aZWUpzDiY356vVuSVPOQ2H2VpQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 h1:W1EqIm0+QVnfQ2SV138//D9NyAhseDxqLMoWvvhYsQQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0/go.mod h1:KlkHsZ0nKerWsXLZJm3LfFQwusI5k3iN4BgtYTE4IYE= github.com/libp2p/go-libp2p-discovery v0.5.1 h1:CJylx+h2+4+s68GvrM4pGNyfNhOYviWBPtVv5PA7sfo= github.com/libp2p/go-libp2p-discovery v0.5.1/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-kad-dht v0.13.0 h1:qBNYzee8BVS6RkD8ukIAGRG6LmVz8+kkeponyI7W+yA= @@ -481,8 +481,8 @@ github.com/libp2p/go-libp2p-nat v0.0.6 h1:wMWis3kYynCbHoyKLPBEMu4YRLltbm8Mk08HGS github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-netutil v0.1.0 h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= -github.com/libp2p/go-libp2p-noise v0.3.0 h1:NCVH7evhVt9njbTQshzT7N1S3Q6fjj9M11FCgfH5+cA= -github.com/libp2p/go-libp2p-noise v0.3.0/go.mod h1:JNjHbociDJKHD64KTkzGnzqJ0FEV5gHJa6AB00kbCNQ= +github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697 h1:5qAG/SUBwLOt3Ez5StvPqGCo9GZufbhWXUxMx/gqu3w= +github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697/go.mod h1:0zu3CdoZnYw7qE19o829CzuGle5C8angJnoUnnKZXK4= github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.8 h1:nJghUlUkFVvyk7ccsM67oFA6kqUkwyCM1G4WPVMCWYA= @@ -490,8 +490,10 @@ github.com/libp2p/go-libp2p-peerstore v0.2.8/go.mod h1:gGiPlXdz7mIHd2vfAsHzBNAMq github.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-quic-transport v0.11.2/go.mod h1:wlanzKtIh6pHrq+0U3p3DY9PJfGqxMgPaGKaK5LifwQ= -github.com/libp2p/go-libp2p-quic-transport v0.13.0 h1:MTVojS4AnGD/rng6rF/HXEqwMHL27rHUEf3DaqSdnUw= github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921102157-e51edf9828e5/go.mod h1:N65xvhWSylZzC+fmeptSff67wIWXDiAxAWrDqv75d1k= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3 h1:L2z7V9OEoEl/BzxkrKbL0FDyKA1nGE34KhqDkw1bI+E= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3/go.mod h1:jqAKP2f8g0RbAjaCDfUO8Sbt+M6qI8XId+/x5Cx4Ahw= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= github.com/libp2p/go-libp2p-record v0.1.3 h1:R27hoScIhQf/A8XJZ8lYpnqh9LatJ5YbHs28kCIfql0= github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= @@ -499,25 +501,29 @@ github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASo github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= github.com/libp2p/go-libp2p-swarm v0.5.3/go.mod h1:NBn7eNW2lu568L7Ns9wdFrOhgRlkRnIDg0FLKbuu3i8= -github.com/libp2p/go-libp2p-swarm v0.6.0 h1:hM23IOi2H2eAe4hQVreSV/RNW7tXPBCgK62Ll9NvBk4= github.com/libp2p/go-libp2p-swarm v0.6.0/go.mod h1:4oX8qxmlBD3XCQBYDK6zQwVkjz1ySAAuQxDI3v/5aWs= +github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140 h1:x2CVNchyqstd3Swq8CtNjssWmSF6yJ6hBgvO9XzkD+o= +github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140/go.mod h1:VfMP8ORMf/8CssXJuIp2eosApeOr1OuzTGtEpAMfvCs= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g= github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= -github.com/libp2p/go-libp2p-testing v0.5.0 h1:bTjC29TTQ/ODq0ld3+0KLq3irdA5cAH3OMbRi0/QsvE= github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= +github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068 h1:Uhzao0ft5xsws67/qzZNlK1kvQKMwuDj/jr0RHfpU98= +github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068/go.mod h1:zcQ6B90GUqkXx0xdQ0EyBH8XUvlP36pxEdpUFtPtWNk= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= -github.com/libp2p/go-libp2p-tls v0.3.0 h1:8BgvUJiOTcj0Gp6XvEicF0rL5aUtRg/UzEdeZDmDlC8= github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210920171426-0d6a7ee62c41/go.mod h1:osgsIirN9OU6Rjv88xT8us7gCUcuqgYJ94T4LXLZu3s= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca h1:zWNuadGdVHCSc+Z+CwLc8UOTYPyn/lHFU8Gjc46Oobk= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca/go.mod h1:XbkcVbneyNWj5lHFNNkj+ykZKqudvBX40pGE+rU3JaU= github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw= github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk= -github.com/libp2p/go-libp2p-transport-upgrader v0.5.0 h1:7SDl3O2+AYOgfE40Mis83ClpfGNkNA6m4FwhbOHs+iI= github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= +github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8 h1:3I7js9jPQUmOx9Kyt4tRpp6Dt2tYasbWEkLsoiTOkQg= +github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8/go.mod h1:4T3Km0CC97JF4T4KH6BjSScdZLvGk/W0WKAm7MAlwYI= github.com/libp2p/go-libp2p-xor v0.0.0-20210714161855-5c005aca55db/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30= @@ -559,10 +565,11 @@ github.com/libp2p/go-sockaddr v0.1.1/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2L github.com/libp2p/go-stream-muxer-multistream v0.3.0 h1:TqnSHPJEIqDEO7h1wZZ0p3DXdvDSiLHQidKKUGZtiOY= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-tcp-transport v0.2.7 h1:Z8Kc/Kb8tD84WiaH55xAlaEnkqzrp88jSEySCKV4+gg= github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM= -github.com/libp2p/go-ws-transport v0.5.0 h1:cO6x4P0v6PfxbKnxmf5cY2Ny4OPDGYkUqNvZzp/zdlo= -github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= +github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28 h1:BraIDc9Q2XH826pZ9qG8KQRcixMVCdVsdF+MyAvVkCE= +github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28/go.mod h1:E2JmEWwhdFGOTL/3ZOjrIb8Nk53fMpyWEm1hvtMmWtg= +github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d h1:ZCX+aHcWouWLDtynkJ4l40+rEwUe/5yTyWySf2r8Jos= +github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d/go.mod h1:TVByZnHhb7yd2BZHcDzjdjT08nsIqp8xu3hGtu8IQFs= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI= @@ -655,8 +662,9 @@ github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= -github.com/multiformats/go-multiaddr v0.4.0 h1:hL/K4ZJhJ5PTw3nwylq9lGU5yArzcAroZmex1ghSEkQ= -github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= +github.com/multiformats/go-multiaddr v0.4.1-0.20210920085215-fc723035a20c/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= +github.com/multiformats/go-multiaddr v0.4.1 h1:Pq37uLx3hsyNlTDir7FZyU8+cFCTqd5y1KiM2IzOutI= +github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= diff --git a/examples/ipfs-camp-2019/go.mod b/examples/ipfs-camp-2019/go.mod index 2f9d4c5df0..523f4f6a71 100644 --- a/examples/ipfs-camp-2019/go.mod +++ b/examples/ipfs-camp-2019/go.mod @@ -5,16 +5,16 @@ go 1.16 require ( github.com/gogo/protobuf v1.3.2 github.com/libp2p/go-libp2p v0.14.4 - github.com/libp2p/go-libp2p-core v0.10.0 + github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 github.com/libp2p/go-libp2p-discovery v0.5.1 github.com/libp2p/go-libp2p-kad-dht v0.13.0 github.com/libp2p/go-libp2p-mplex v0.4.1 github.com/libp2p/go-libp2p-pubsub v0.5.3 - github.com/libp2p/go-libp2p-tls v0.3.0 + github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca github.com/libp2p/go-libp2p-yamux v0.5.4 - github.com/libp2p/go-tcp-transport v0.2.7 - github.com/libp2p/go-ws-transport v0.5.0 - github.com/multiformats/go-multiaddr v0.4.0 + github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28 + github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d + github.com/multiformats/go-multiaddr v0.4.1 ) // Ensure that examples always use the go-libp2p version in the same git checkout. diff --git a/examples/ipfs-camp-2019/go.sum b/examples/ipfs-camp-2019/go.sum index 05cab86749..d46fe6c389 100644 --- a/examples/ipfs-camp-2019/go.sum +++ b/examples/ipfs-camp-2019/go.sum @@ -440,7 +440,7 @@ github.com/libp2p/go-libp2p-autonat v0.5.0 h1:/+3+4NcQV47DQ/duvRyFDP8oxv6CQTvSKY github.com/libp2p/go-libp2p-autonat v0.5.0/go.mod h1:085tmmuXn0nXgFwuF7a2tt4UxgTjuapbuml27v4htKY= github.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk= github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= -github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= +github.com/libp2p/go-libp2p-circuit v0.4.1-0.20210921174845-5bf9f8e3f668/go.mod h1:0+O0YpceOlau8d1dUckSr8G5jVsbrQWYC20xzmvS0GA= github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= @@ -461,11 +461,11 @@ github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJB github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.2/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM= -github.com/libp2p/go-libp2p-core v0.9.0/go.mod h1:ESsbz31oC3C1AvMJoGx26RTuCkNhmkSRCqZ0kQtJ2/8= -github.com/libp2p/go-libp2p-core v0.10.0 h1:jFy7v5Muq58GTeYkPhGzIH8Qq4BFfziqc0ixPd/pP9k= github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210920171028-61a54c107072/go.mod h1:Ac52V2PMajsRlNG09aZWUpzDiY356vVuSVPOQ2H2VpQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 h1:W1EqIm0+QVnfQ2SV138//D9NyAhseDxqLMoWvvhYsQQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0/go.mod h1:KlkHsZ0nKerWsXLZJm3LfFQwusI5k3iN4BgtYTE4IYE= github.com/libp2p/go-libp2p-discovery v0.5.1 h1:CJylx+h2+4+s68GvrM4pGNyfNhOYviWBPtVv5PA7sfo= github.com/libp2p/go-libp2p-discovery v0.5.1/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-kad-dht v0.13.0 h1:qBNYzee8BVS6RkD8ukIAGRG6LmVz8+kkeponyI7W+yA= @@ -482,8 +482,8 @@ github.com/libp2p/go-libp2p-nat v0.0.6 h1:wMWis3kYynCbHoyKLPBEMu4YRLltbm8Mk08HGS github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-netutil v0.1.0 h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= -github.com/libp2p/go-libp2p-noise v0.3.0 h1:NCVH7evhVt9njbTQshzT7N1S3Q6fjj9M11FCgfH5+cA= -github.com/libp2p/go-libp2p-noise v0.3.0/go.mod h1:JNjHbociDJKHD64KTkzGnzqJ0FEV5gHJa6AB00kbCNQ= +github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697 h1:5qAG/SUBwLOt3Ez5StvPqGCo9GZufbhWXUxMx/gqu3w= +github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697/go.mod h1:0zu3CdoZnYw7qE19o829CzuGle5C8angJnoUnnKZXK4= github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.8 h1:nJghUlUkFVvyk7ccsM67oFA6kqUkwyCM1G4WPVMCWYA= @@ -493,8 +493,10 @@ github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYc github.com/libp2p/go-libp2p-pubsub v0.5.3 h1:XCn5xvgA/AKpbbaeqbomfKtQCbT9QsU39tYsVj0IndQ= github.com/libp2p/go-libp2p-pubsub v0.5.3/go.mod h1:gVOzwebXVdSMDQBTfH8ACO5EJ4SQrvsHqCmYsCZpD0E= github.com/libp2p/go-libp2p-quic-transport v0.11.2/go.mod h1:wlanzKtIh6pHrq+0U3p3DY9PJfGqxMgPaGKaK5LifwQ= -github.com/libp2p/go-libp2p-quic-transport v0.13.0 h1:MTVojS4AnGD/rng6rF/HXEqwMHL27rHUEf3DaqSdnUw= github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921102157-e51edf9828e5/go.mod h1:N65xvhWSylZzC+fmeptSff67wIWXDiAxAWrDqv75d1k= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3 h1:L2z7V9OEoEl/BzxkrKbL0FDyKA1nGE34KhqDkw1bI+E= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3/go.mod h1:jqAKP2f8g0RbAjaCDfUO8Sbt+M6qI8XId+/x5Cx4Ahw= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= github.com/libp2p/go-libp2p-record v0.1.3 h1:R27hoScIhQf/A8XJZ8lYpnqh9LatJ5YbHs28kCIfql0= github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= @@ -502,25 +504,29 @@ github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASo github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= github.com/libp2p/go-libp2p-swarm v0.5.3/go.mod h1:NBn7eNW2lu568L7Ns9wdFrOhgRlkRnIDg0FLKbuu3i8= -github.com/libp2p/go-libp2p-swarm v0.6.0 h1:hM23IOi2H2eAe4hQVreSV/RNW7tXPBCgK62Ll9NvBk4= github.com/libp2p/go-libp2p-swarm v0.6.0/go.mod h1:4oX8qxmlBD3XCQBYDK6zQwVkjz1ySAAuQxDI3v/5aWs= +github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140 h1:x2CVNchyqstd3Swq8CtNjssWmSF6yJ6hBgvO9XzkD+o= +github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140/go.mod h1:VfMP8ORMf/8CssXJuIp2eosApeOr1OuzTGtEpAMfvCs= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g= github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= -github.com/libp2p/go-libp2p-testing v0.5.0 h1:bTjC29TTQ/ODq0ld3+0KLq3irdA5cAH3OMbRi0/QsvE= github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= +github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068 h1:Uhzao0ft5xsws67/qzZNlK1kvQKMwuDj/jr0RHfpU98= +github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068/go.mod h1:zcQ6B90GUqkXx0xdQ0EyBH8XUvlP36pxEdpUFtPtWNk= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= -github.com/libp2p/go-libp2p-tls v0.3.0 h1:8BgvUJiOTcj0Gp6XvEicF0rL5aUtRg/UzEdeZDmDlC8= github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210920171426-0d6a7ee62c41/go.mod h1:osgsIirN9OU6Rjv88xT8us7gCUcuqgYJ94T4LXLZu3s= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca h1:zWNuadGdVHCSc+Z+CwLc8UOTYPyn/lHFU8Gjc46Oobk= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca/go.mod h1:XbkcVbneyNWj5lHFNNkj+ykZKqudvBX40pGE+rU3JaU= github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw= github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk= -github.com/libp2p/go-libp2p-transport-upgrader v0.5.0 h1:7SDl3O2+AYOgfE40Mis83ClpfGNkNA6m4FwhbOHs+iI= github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= +github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8 h1:3I7js9jPQUmOx9Kyt4tRpp6Dt2tYasbWEkLsoiTOkQg= +github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8/go.mod h1:4T3Km0CC97JF4T4KH6BjSScdZLvGk/W0WKAm7MAlwYI= github.com/libp2p/go-libp2p-xor v0.0.0-20210714161855-5c005aca55db/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30= @@ -562,10 +568,11 @@ github.com/libp2p/go-sockaddr v0.1.1/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2L github.com/libp2p/go-stream-muxer-multistream v0.3.0 h1:TqnSHPJEIqDEO7h1wZZ0p3DXdvDSiLHQidKKUGZtiOY= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-tcp-transport v0.2.7 h1:Z8Kc/Kb8tD84WiaH55xAlaEnkqzrp88jSEySCKV4+gg= github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM= -github.com/libp2p/go-ws-transport v0.5.0 h1:cO6x4P0v6PfxbKnxmf5cY2Ny4OPDGYkUqNvZzp/zdlo= -github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= +github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28 h1:BraIDc9Q2XH826pZ9qG8KQRcixMVCdVsdF+MyAvVkCE= +github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28/go.mod h1:E2JmEWwhdFGOTL/3ZOjrIb8Nk53fMpyWEm1hvtMmWtg= +github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d h1:ZCX+aHcWouWLDtynkJ4l40+rEwUe/5yTyWySf2r8Jos= +github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d/go.mod h1:TVByZnHhb7yd2BZHcDzjdjT08nsIqp8xu3hGtu8IQFs= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI= @@ -658,8 +665,9 @@ github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= -github.com/multiformats/go-multiaddr v0.4.0 h1:hL/K4ZJhJ5PTw3nwylq9lGU5yArzcAroZmex1ghSEkQ= -github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= +github.com/multiformats/go-multiaddr v0.4.1-0.20210920085215-fc723035a20c/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= +github.com/multiformats/go-multiaddr v0.4.1 h1:Pq37uLx3hsyNlTDir7FZyU8+cFCTqd5y1KiM2IzOutI= +github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= diff --git a/examples/pubsub/chat/go.mod b/examples/pubsub/chat/go.mod index 035ebf193a..382bf44281 100644 --- a/examples/pubsub/chat/go.mod +++ b/examples/pubsub/chat/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/gdamore/tcell/v2 v2.1.0 github.com/libp2p/go-libp2p v0.14.1 - github.com/libp2p/go-libp2p-core v0.10.0 + github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 github.com/libp2p/go-libp2p-pubsub v0.5.3 github.com/rivo/tview v0.0.0-20210125085121-dbc1f32bb1d0 ) diff --git a/examples/pubsub/chat/go.sum b/examples/pubsub/chat/go.sum index 5d60db9335..d122e97cb8 100644 --- a/examples/pubsub/chat/go.sum +++ b/examples/pubsub/chat/go.sum @@ -419,7 +419,7 @@ github.com/libp2p/go-libp2p-autonat v0.5.0 h1:/+3+4NcQV47DQ/duvRyFDP8oxv6CQTvSKY github.com/libp2p/go-libp2p-autonat v0.5.0/go.mod h1:085tmmuXn0nXgFwuF7a2tt4UxgTjuapbuml27v4htKY= github.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk= github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= -github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= +github.com/libp2p/go-libp2p-circuit v0.4.1-0.20210921174845-5bf9f8e3f668/go.mod h1:0+O0YpceOlau8d1dUckSr8G5jVsbrQWYC20xzmvS0GA= github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= @@ -436,11 +436,11 @@ github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.2/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM= -github.com/libp2p/go-libp2p-core v0.9.0/go.mod h1:ESsbz31oC3C1AvMJoGx26RTuCkNhmkSRCqZ0kQtJ2/8= -github.com/libp2p/go-libp2p-core v0.10.0 h1:jFy7v5Muq58GTeYkPhGzIH8Qq4BFfziqc0ixPd/pP9k= github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210920171028-61a54c107072/go.mod h1:Ac52V2PMajsRlNG09aZWUpzDiY356vVuSVPOQ2H2VpQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 h1:W1EqIm0+QVnfQ2SV138//D9NyAhseDxqLMoWvvhYsQQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0/go.mod h1:KlkHsZ0nKerWsXLZJm3LfFQwusI5k3iN4BgtYTE4IYE= github.com/libp2p/go-libp2p-discovery v0.5.1 h1:CJylx+h2+4+s68GvrM4pGNyfNhOYviWBPtVv5PA7sfo= github.com/libp2p/go-libp2p-discovery v0.5.1/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= @@ -452,8 +452,8 @@ github.com/libp2p/go-libp2p-nat v0.0.6 h1:wMWis3kYynCbHoyKLPBEMu4YRLltbm8Mk08HGS github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-netutil v0.1.0 h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= -github.com/libp2p/go-libp2p-noise v0.3.0 h1:NCVH7evhVt9njbTQshzT7N1S3Q6fjj9M11FCgfH5+cA= -github.com/libp2p/go-libp2p-noise v0.3.0/go.mod h1:JNjHbociDJKHD64KTkzGnzqJ0FEV5gHJa6AB00kbCNQ= +github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697 h1:5qAG/SUBwLOt3Ez5StvPqGCo9GZufbhWXUxMx/gqu3w= +github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697/go.mod h1:0zu3CdoZnYw7qE19o829CzuGle5C8angJnoUnnKZXK4= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.8 h1:nJghUlUkFVvyk7ccsM67oFA6kqUkwyCM1G4WPVMCWYA= github.com/libp2p/go-libp2p-peerstore v0.2.8/go.mod h1:gGiPlXdz7mIHd2vfAsHzBNAMqSDkt2UBFwgcITgw1lA= @@ -462,30 +462,36 @@ github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYc github.com/libp2p/go-libp2p-pubsub v0.5.3 h1:XCn5xvgA/AKpbbaeqbomfKtQCbT9QsU39tYsVj0IndQ= github.com/libp2p/go-libp2p-pubsub v0.5.3/go.mod h1:gVOzwebXVdSMDQBTfH8ACO5EJ4SQrvsHqCmYsCZpD0E= github.com/libp2p/go-libp2p-quic-transport v0.11.2/go.mod h1:wlanzKtIh6pHrq+0U3p3DY9PJfGqxMgPaGKaK5LifwQ= -github.com/libp2p/go-libp2p-quic-transport v0.13.0 h1:MTVojS4AnGD/rng6rF/HXEqwMHL27rHUEf3DaqSdnUw= github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921102157-e51edf9828e5/go.mod h1:N65xvhWSylZzC+fmeptSff67wIWXDiAxAWrDqv75d1k= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3 h1:L2z7V9OEoEl/BzxkrKbL0FDyKA1nGE34KhqDkw1bI+E= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3/go.mod h1:jqAKP2f8g0RbAjaCDfUO8Sbt+M6qI8XId+/x5Cx4Ahw= github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= github.com/libp2p/go-libp2p-swarm v0.5.3/go.mod h1:NBn7eNW2lu568L7Ns9wdFrOhgRlkRnIDg0FLKbuu3i8= -github.com/libp2p/go-libp2p-swarm v0.6.0 h1:hM23IOi2H2eAe4hQVreSV/RNW7tXPBCgK62Ll9NvBk4= github.com/libp2p/go-libp2p-swarm v0.6.0/go.mod h1:4oX8qxmlBD3XCQBYDK6zQwVkjz1ySAAuQxDI3v/5aWs= +github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140 h1:x2CVNchyqstd3Swq8CtNjssWmSF6yJ6hBgvO9XzkD+o= +github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140/go.mod h1:VfMP8ORMf/8CssXJuIp2eosApeOr1OuzTGtEpAMfvCs= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g= github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= -github.com/libp2p/go-libp2p-testing v0.5.0 h1:bTjC29TTQ/ODq0ld3+0KLq3irdA5cAH3OMbRi0/QsvE= github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= +github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068 h1:Uhzao0ft5xsws67/qzZNlK1kvQKMwuDj/jr0RHfpU98= +github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068/go.mod h1:zcQ6B90GUqkXx0xdQ0EyBH8XUvlP36pxEdpUFtPtWNk= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= -github.com/libp2p/go-libp2p-tls v0.3.0 h1:8BgvUJiOTcj0Gp6XvEicF0rL5aUtRg/UzEdeZDmDlC8= github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210920171426-0d6a7ee62c41/go.mod h1:osgsIirN9OU6Rjv88xT8us7gCUcuqgYJ94T4LXLZu3s= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca h1:zWNuadGdVHCSc+Z+CwLc8UOTYPyn/lHFU8Gjc46Oobk= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca/go.mod h1:XbkcVbneyNWj5lHFNNkj+ykZKqudvBX40pGE+rU3JaU= github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw= github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk= -github.com/libp2p/go-libp2p-transport-upgrader v0.5.0 h1:7SDl3O2+AYOgfE40Mis83ClpfGNkNA6m4FwhbOHs+iI= github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= +github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8 h1:3I7js9jPQUmOx9Kyt4tRpp6Dt2tYasbWEkLsoiTOkQg= +github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8/go.mod h1:4T3Km0CC97JF4T4KH6BjSScdZLvGk/W0WKAm7MAlwYI= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30= github.com/libp2p/go-libp2p-yamux v0.5.0/go.mod h1:AyR8k5EzyM2QN9Bbdg6X1SkVVuqLwTGf0L4DFq9g6po= @@ -525,10 +531,11 @@ github.com/libp2p/go-sockaddr v0.1.1/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2L github.com/libp2p/go-stream-muxer-multistream v0.3.0 h1:TqnSHPJEIqDEO7h1wZZ0p3DXdvDSiLHQidKKUGZtiOY= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-tcp-transport v0.2.7 h1:Z8Kc/Kb8tD84WiaH55xAlaEnkqzrp88jSEySCKV4+gg= github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM= -github.com/libp2p/go-ws-transport v0.5.0 h1:cO6x4P0v6PfxbKnxmf5cY2Ny4OPDGYkUqNvZzp/zdlo= -github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= +github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28 h1:BraIDc9Q2XH826pZ9qG8KQRcixMVCdVsdF+MyAvVkCE= +github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28/go.mod h1:E2JmEWwhdFGOTL/3ZOjrIb8Nk53fMpyWEm1hvtMmWtg= +github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d h1:ZCX+aHcWouWLDtynkJ4l40+rEwUe/5yTyWySf2r8Jos= +github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d/go.mod h1:TVByZnHhb7yd2BZHcDzjdjT08nsIqp8xu3hGtu8IQFs= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI= @@ -625,8 +632,9 @@ github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= -github.com/multiformats/go-multiaddr v0.4.0 h1:hL/K4ZJhJ5PTw3nwylq9lGU5yArzcAroZmex1ghSEkQ= -github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= +github.com/multiformats/go-multiaddr v0.4.1-0.20210920085215-fc723035a20c/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= +github.com/multiformats/go-multiaddr v0.4.1 h1:Pq37uLx3hsyNlTDir7FZyU8+cFCTqd5y1KiM2IzOutI= +github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= diff --git a/go.mod b/go.mod index a64fe2ce70..25f8a8d170 100644 --- a/go.mod +++ b/go.mod @@ -23,28 +23,28 @@ require ( github.com/libp2p/go-libp2p-asn-util v0.0.0-20210818120414-1f382a4aa43a github.com/libp2p/go-libp2p-autonat v0.5.0 github.com/libp2p/go-libp2p-blankhost v0.2.0 - github.com/libp2p/go-libp2p-circuit v0.4.0 - github.com/libp2p/go-libp2p-core v0.10.0 + github.com/libp2p/go-libp2p-circuit v0.4.1-0.20210921174845-5bf9f8e3f668 + github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 github.com/libp2p/go-libp2p-discovery v0.5.1 github.com/libp2p/go-libp2p-mplex v0.4.1 github.com/libp2p/go-libp2p-nat v0.0.6 github.com/libp2p/go-libp2p-netutil v0.1.0 - github.com/libp2p/go-libp2p-noise v0.3.0 + github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697 github.com/libp2p/go-libp2p-peerstore v0.2.8 - github.com/libp2p/go-libp2p-quic-transport v0.13.0 - github.com/libp2p/go-libp2p-swarm v0.6.0 - github.com/libp2p/go-libp2p-testing v0.5.0 - github.com/libp2p/go-libp2p-tls v0.3.0 - github.com/libp2p/go-libp2p-transport-upgrader v0.5.0 + github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3 + github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140 + github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068 + github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca + github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8 github.com/libp2p/go-libp2p-yamux v0.5.4 github.com/libp2p/go-msgio v0.0.6 github.com/libp2p/go-netroute v0.1.6 github.com/libp2p/go-stream-muxer-multistream v0.3.0 - github.com/libp2p/go-tcp-transport v0.2.7 - github.com/libp2p/go-ws-transport v0.5.0 + github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28 + github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d github.com/libp2p/zeroconf/v2 v2.0.0 github.com/miekg/dns v1.1.43 // indirect - github.com/multiformats/go-multiaddr v0.4.0 + github.com/multiformats/go-multiaddr v0.4.1 github.com/multiformats/go-multiaddr-dns v0.3.1 github.com/multiformats/go-multistream v0.2.2 github.com/multiformats/go-varint v0.0.6 diff --git a/go.sum b/go.sum index 018face781..2e7171fd70 100644 --- a/go.sum +++ b/go.sum @@ -414,8 +414,8 @@ github.com/libp2p/go-libp2p-autonat v0.5.0 h1:/+3+4NcQV47DQ/duvRyFDP8oxv6CQTvSKY github.com/libp2p/go-libp2p-autonat v0.5.0/go.mod h1:085tmmuXn0nXgFwuF7a2tt4UxgTjuapbuml27v4htKY= github.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk= github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= -github.com/libp2p/go-libp2p-circuit v0.4.0 h1:eqQ3sEYkGTtybWgr6JLqJY6QLtPWRErvFjFDfAOO1wc= -github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= +github.com/libp2p/go-libp2p-circuit v0.4.1-0.20210921174845-5bf9f8e3f668 h1:JBzGP8ZHVrjEF4+/mMYg3X74q49RoNDpEL2VM/oBM8A= +github.com/libp2p/go-libp2p-circuit v0.4.1-0.20210921174845-5bf9f8e3f668/go.mod h1:0+O0YpceOlau8d1dUckSr8G5jVsbrQWYC20xzmvS0GA= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI= github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= @@ -430,11 +430,11 @@ github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.2/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM= -github.com/libp2p/go-libp2p-core v0.9.0/go.mod h1:ESsbz31oC3C1AvMJoGx26RTuCkNhmkSRCqZ0kQtJ2/8= -github.com/libp2p/go-libp2p-core v0.10.0 h1:jFy7v5Muq58GTeYkPhGzIH8Qq4BFfziqc0ixPd/pP9k= github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210920171028-61a54c107072/go.mod h1:Ac52V2PMajsRlNG09aZWUpzDiY356vVuSVPOQ2H2VpQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 h1:W1EqIm0+QVnfQ2SV138//D9NyAhseDxqLMoWvvhYsQQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0/go.mod h1:KlkHsZ0nKerWsXLZJm3LfFQwusI5k3iN4BgtYTE4IYE= github.com/libp2p/go-libp2p-discovery v0.5.1 h1:CJylx+h2+4+s68GvrM4pGNyfNhOYviWBPtVv5PA7sfo= github.com/libp2p/go-libp2p-discovery v0.5.1/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= @@ -446,35 +446,41 @@ github.com/libp2p/go-libp2p-nat v0.0.6 h1:wMWis3kYynCbHoyKLPBEMu4YRLltbm8Mk08HGS github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-netutil v0.1.0 h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= -github.com/libp2p/go-libp2p-noise v0.3.0 h1:NCVH7evhVt9njbTQshzT7N1S3Q6fjj9M11FCgfH5+cA= -github.com/libp2p/go-libp2p-noise v0.3.0/go.mod h1:JNjHbociDJKHD64KTkzGnzqJ0FEV5gHJa6AB00kbCNQ= +github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697 h1:5qAG/SUBwLOt3Ez5StvPqGCo9GZufbhWXUxMx/gqu3w= +github.com/libp2p/go-libp2p-noise v0.3.1-0.20210921174126-fa31d59f9697/go.mod h1:0zu3CdoZnYw7qE19o829CzuGle5C8angJnoUnnKZXK4= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.8 h1:nJghUlUkFVvyk7ccsM67oFA6kqUkwyCM1G4WPVMCWYA= github.com/libp2p/go-libp2p-peerstore v0.2.8/go.mod h1:gGiPlXdz7mIHd2vfAsHzBNAMqSDkt2UBFwgcITgw1lA= github.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= -github.com/libp2p/go-libp2p-quic-transport v0.13.0 h1:MTVojS4AnGD/rng6rF/HXEqwMHL27rHUEf3DaqSdnUw= github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921102157-e51edf9828e5/go.mod h1:N65xvhWSylZzC+fmeptSff67wIWXDiAxAWrDqv75d1k= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3 h1:L2z7V9OEoEl/BzxkrKbL0FDyKA1nGE34KhqDkw1bI+E= +github.com/libp2p/go-libp2p-quic-transport v0.13.1-0.20210921174332-c419ce9c3de3/go.mod h1:jqAKP2f8g0RbAjaCDfUO8Sbt+M6qI8XId+/x5Cx4Ahw= github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= -github.com/libp2p/go-libp2p-swarm v0.6.0 h1:hM23IOi2H2eAe4hQVreSV/RNW7tXPBCgK62Ll9NvBk4= github.com/libp2p/go-libp2p-swarm v0.6.0/go.mod h1:4oX8qxmlBD3XCQBYDK6zQwVkjz1ySAAuQxDI3v/5aWs= +github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140 h1:x2CVNchyqstd3Swq8CtNjssWmSF6yJ6hBgvO9XzkD+o= +github.com/libp2p/go-libp2p-swarm v0.6.1-0.20210922105329-6a837b036140/go.mod h1:VfMP8ORMf/8CssXJuIp2eosApeOr1OuzTGtEpAMfvCs= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g= github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= -github.com/libp2p/go-libp2p-testing v0.5.0 h1:bTjC29TTQ/ODq0ld3+0KLq3irdA5cAH3OMbRi0/QsvE= github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= -github.com/libp2p/go-libp2p-tls v0.3.0 h1:8BgvUJiOTcj0Gp6XvEicF0rL5aUtRg/UzEdeZDmDlC8= +github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068 h1:Uhzao0ft5xsws67/qzZNlK1kvQKMwuDj/jr0RHfpU98= +github.com/libp2p/go-libp2p-testing v0.5.1-0.20210921173022-d2d7433a5068/go.mod h1:zcQ6B90GUqkXx0xdQ0EyBH8XUvlP36pxEdpUFtPtWNk= github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210920171426-0d6a7ee62c41/go.mod h1:osgsIirN9OU6Rjv88xT8us7gCUcuqgYJ94T4LXLZu3s= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca h1:zWNuadGdVHCSc+Z+CwLc8UOTYPyn/lHFU8Gjc46Oobk= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca/go.mod h1:XbkcVbneyNWj5lHFNNkj+ykZKqudvBX40pGE+rU3JaU= github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw= github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk= -github.com/libp2p/go-libp2p-transport-upgrader v0.5.0 h1:7SDl3O2+AYOgfE40Mis83ClpfGNkNA6m4FwhbOHs+iI= github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= +github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8 h1:3I7js9jPQUmOx9Kyt4tRpp6Dt2tYasbWEkLsoiTOkQg= +github.com/libp2p/go-libp2p-transport-upgrader v0.5.1-0.20210922105033-ad6ad0abd9c8/go.mod h1:4T3Km0CC97JF4T4KH6BjSScdZLvGk/W0WKAm7MAlwYI= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30= github.com/libp2p/go-libp2p-yamux v0.5.0/go.mod h1:AyR8k5EzyM2QN9Bbdg6X1SkVVuqLwTGf0L4DFq9g6po= @@ -514,10 +520,11 @@ github.com/libp2p/go-sockaddr v0.1.1/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2L github.com/libp2p/go-stream-muxer-multistream v0.3.0 h1:TqnSHPJEIqDEO7h1wZZ0p3DXdvDSiLHQidKKUGZtiOY= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-tcp-transport v0.2.7 h1:Z8Kc/Kb8tD84WiaH55xAlaEnkqzrp88jSEySCKV4+gg= github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM= -github.com/libp2p/go-ws-transport v0.5.0 h1:cO6x4P0v6PfxbKnxmf5cY2Ny4OPDGYkUqNvZzp/zdlo= -github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= +github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28 h1:BraIDc9Q2XH826pZ9qG8KQRcixMVCdVsdF+MyAvVkCE= +github.com/libp2p/go-tcp-transport v0.2.9-0.20210922105139-fe3437611b28/go.mod h1:E2JmEWwhdFGOTL/3ZOjrIb8Nk53fMpyWEm1hvtMmWtg= +github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d h1:ZCX+aHcWouWLDtynkJ4l40+rEwUe/5yTyWySf2r8Jos= +github.com/libp2p/go-ws-transport v0.5.1-0.20210921174602-b33b43d7934d/go.mod h1:TVByZnHhb7yd2BZHcDzjdjT08nsIqp8xu3hGtu8IQFs= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI= @@ -606,8 +613,9 @@ github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= -github.com/multiformats/go-multiaddr v0.4.0 h1:hL/K4ZJhJ5PTw3nwylq9lGU5yArzcAroZmex1ghSEkQ= -github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= +github.com/multiformats/go-multiaddr v0.4.1-0.20210920085215-fc723035a20c/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= +github.com/multiformats/go-multiaddr v0.4.1 h1:Pq37uLx3hsyNlTDir7FZyU8+cFCTqd5y1KiM2IzOutI= +github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= diff --git a/p2p/protocol/circuitv2/client/transport.go b/p2p/protocol/circuitv2/client/transport.go index b40adb8fc1..4d21715e31 100644 --- a/p2p/protocol/circuitv2/client/transport.go +++ b/p2p/protocol/circuitv2/client/transport.go @@ -73,8 +73,10 @@ func (c *Client) Listen(addr ma.Multiaddr) (transport.Listener, error) { return c.upgrader.UpgradeListener(c, c.Listener()), nil } -func (c *Client) Protocols() []int { - return []int{ma.P_CIRCUIT} +var protoCircuit = ma.ProtocolWithCode(ma.P_CIRCUIT) + +func (c *Client) Protocols() []ma.Protocol { + return []ma.Protocol{protoCircuit} } func (c *Client) Proxy() bool {