Skip to content

Commit

Permalink
construct a separate transport for every handshake protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Sep 22, 2021
1 parent 8a70f70 commit 826aa23
Show file tree
Hide file tree
Showing 12 changed files with 166 additions and 111 deletions.
39 changes: 29 additions & 10 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion config/constructor_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() },
Expand Down
16 changes: 9 additions & 7 deletions config/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
10 changes: 5 additions & 5 deletions examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
42 changes: 25 additions & 17 deletions examples/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand All @@ -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=
Expand All @@ -481,43 +481,49 @@ 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=
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.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=
github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw=
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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
10 changes: 5 additions & 5 deletions examples/ipfs-camp-2019/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 826aa23

Please sign in to comment.