1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-23 13:44:27 +08:00

add QUIC support

License: MIT
Signed-off-by: Marten Seemann <martenseemann@gmail.com>
This commit is contained in:
Marten Seemann
2018-08-07 15:02:02 +07:00
parent 1c57b1d287
commit 481d19e303
3 changed files with 45 additions and 4 deletions

View File

@ -59,6 +59,7 @@ import (
exchange "gx/ipfs/QmWw71Mz9PXKgYG8ZfTYN7Ax2Zm48Eurbne3wC2y7CKmLz/go-ipfs-exchange-interface"
ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format"
smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer"
quic "gx/ipfs/QmYfvQoJCUTCJ54Rog3zWSCDWAkwLWFTMKzcwaNMpXYSQT/go-libp2p-quic-transport"
ma "gx/ipfs/QmYmsdtJ3HsodkePE3eU3TsCaP2YvPZJ4LoXnNkDE5Tpt7/go-multiaddr"
cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid"
pnet "gx/ipfs/QmZaQ3K9PRd5sYYoG1xbTGPtd3N7TYiKBRmcBUTsx8HVET/go-libp2p-pnet"
@ -248,6 +249,10 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(opts...))
}
if cfg.Experimental.QUIC {
libp2pOpts = append(libp2pOpts, libp2p.Transport(quic.NewTransport))
}
peerhost, err := hostOption(ctx, n.Identity, n.Peerstore, libp2pOpts...)
if err != nil {

View File

@ -435,5 +435,35 @@ run your daemon with the `--enable-namesys-pubsub` flag; enables pubsub.
- [ ] Needs more people to use and report on how well it works
- [ ] Add a mechanism for last record distribution on subscription,
so that we don't have to hit the DHT for the initial resolution.
Alternatively, we could republish the last record periodically.
so that we don't have to hit the DHT for the initial resolution.
Alternatively, we could republish the last record periodically.
## QUIC
### In Version
0.4.18
### State
Experiment, disabled by default
### How to enable
Modify your ipfs config:
```
ipfs config --json Experimental.QUIC true
```
For listening on a QUIC address, add it the swarm addresses, e.g. `/ip4/0.0.0.0/udp/4001/quic`.
### Road to being a real feature
- [ ] The IETF QUIC specification needs to be finalised.
- [ ] Make sure QUIC connections work reliably
- [ ] Make sure QUIC connection offer equal or better performance than TCP connections on real world networks
- [ ] Finalize libp2p-TLS handshake spec.

View File

@ -47,9 +47,9 @@
"version": "0.1.3"
},
{
"hash": "Qma3W91Bv19pWABzgjhdCM2PrTWcdS41bp52kp4Bd3xZYk",
"hash": "QmZfgNhC8E8ys86AeJb2QuRXbq5HK3gPott2df5PgsSsJh",
"name": "iptb",
"version": "1.3.8"
"version": "1.3.9"
},
{
"hash": "QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8",
@ -545,6 +545,12 @@
"hash": "QmfXU2MhWoegxHoeMd3A2ytL2P6CY4FfqGWc23LTNWBwZt",
"name": "go-multiaddr-dns",
"version": "0.2.4"
},
{
"author": "marten-seemann",
"hash": "QmYfvQoJCUTCJ54Rog3zWSCDWAkwLWFTMKzcwaNMpXYSQT",
"name": "go-libp2p-quic-transport",
"version": "0.2.3"
}
],
"gxVersion": "0.10.0",