@cryptotaxi247 / kubo / commits / 481d19e30

add QUIC support

License: MIT Signed-off-by: Marten Seemann <martenseemann@gmail.com>

Marten Seemann committed Aug 7, 2018 at 15:02 UTC 481d19e3034e810e99492fa760f3b04a141a5a34
3 files changed +45 -4
core/core.go
+5
@@ -59,6 +59,7 @@ import (
59 exchange "gx/ipfs/QmWw71Mz9PXKgYG8ZfTYN7Ax2Zm48Eurbne3wC2y7CKmLz/go-ipfs-exchange-interface"
60 ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format"
61 smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer"
62 + quic "gx/ipfs/QmYfvQoJCUTCJ54Rog3zWSCDWAkwLWFTMKzcwaNMpXYSQT/go-libp2p-quic-transport"
63 ma "gx/ipfs/QmYmsdtJ3HsodkePE3eU3TsCaP2YvPZJ4LoXnNkDE5Tpt7/go-multiaddr"
64 cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid"
65 pnet "gx/ipfs/QmZaQ3K9PRd5sYYoG1xbTGPtd3N7TYiKBRmcBUTsx8HVET/go-libp2p-pnet"
@@ -248,6 +249,10 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
249 libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(opts...))
250 }
251
252 + if cfg.Experimental.QUIC {
253 + libp2pOpts = append(libp2pOpts, libp2p.Transport(quic.NewTransport))
254 + }
255 +
256 peerhost, err := hostOption(ctx, n.Identity, n.Peerstore, libp2pOpts...)
257
258 if err != nil {
docs/experimental-features.md
+32 -2
@@ -435,5 +435,35 @@ run your daemon with the `--enable-namesys-pubsub` flag; enables pubsub.
435
436 - [ ] Needs more people to use and report on how well it works
437 - [ ] Add a mechanism for last record distribution on subscription,
438 - so that we don't have to hit the DHT for the initial resolution.
439 - Alternatively, we could republish the last record periodically.
438 + so that we don't have to hit the DHT for the initial resolution.
439 + Alternatively, we could republish the last record periodically.
440 +
441 +
442 +
443 +## QUIC
444 +
445 +### In Version
446 +
447 +0.4.18
448 +
449 +### State
450 +
451 +Experiment, disabled by default
452 +
453 +### How to enable
454 +
455 +Modify your ipfs config:
456 +
457 +```
458 +ipfs config --json Experimental.QUIC true
459 +```
460 +
461 +For listening on a QUIC address, add it the swarm addresses, e.g. `/ip4/0.0.0.0/udp/4001/quic`.
462 +
463 +
464 +### Road to being a real feature
465 +
466 +- [ ] The IETF QUIC specification needs to be finalised.
467 +- [ ] Make sure QUIC connections work reliably
468 +- [ ] Make sure QUIC connection offer equal or better performance than TCP connections on real world networks
469 +- [ ] Finalize libp2p-TLS handshake spec.
package.json
+8 -2
@@ -47,9 +47,9 @@
47 "version": "0.1.3"
48 },
49 {
50 - "hash": "Qma3W91Bv19pWABzgjhdCM2PrTWcdS41bp52kp4Bd3xZYk",
50 + "hash": "QmZfgNhC8E8ys86AeJb2QuRXbq5HK3gPott2df5PgsSsJh",
51 "name": "iptb",
52 - "version": "1.3.8"
52 + "version": "1.3.9"
53 },
54 {
55 "hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8",
@@ -545,6 +545,12 @@
545 "hash": "QmfXU2MhWoegxHoeMd3A2ytL2P6CY4FfqGWc23LTNWBwZt",
546 "name": "go-multiaddr-dns",
547 "version": "0.2.4"
548 + },
549 + {
550 + "author": "marten-seemann",
551 + "hash": "QmYfvQoJCUTCJ54Rog3zWSCDWAkwLWFTMKzcwaNMpXYSQT",
552 + "name": "go-libp2p-quic-transport",
553 + "version": "0.2.3"
554 }
555 ],
556 "gxVersion": "0.10.0",