PoC Hole Punching Implementation
Created by: cannium
related to https://github.com/ipbit/ipfsbit/issues/21 branch https://github.com/ipbit/go-libp2p/tree/punching pull request https://github.com/libp2p/go-libp2p/pull/490
-
collect observed QUIC addr
- send it in identify
-
run
go-libp2p-autonat-svc
by default - pass IPFS DHT to libp2p properly: copied from https://github.com/ipfs/go-ipfs/pull/5785/files
-
register
Connected
callback likeAutoNATProto
do- sleep
IdentifyDelay
- if support "PunchingProto" && both behind NAT, send punching request, contains observed QUIC addr
- sleep
- dial back routine
- keepalive: 30s by default in quic-go
- prioritize QUIC connection when starting new streams
configs need change
"Addresses": {
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001",
"/ip4/0.0.0.0/udp/4002/quic",
"/ip6/::/udp/4002/quic"
]
}
"Swarm": {
"DisableRelay": false,
"EnableRelayHop": false,
}
"Experimental": {
"QUIC": true
}