swarm connect will use any available address not just the given multiaddress
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
### Checklist
- [X] This is a bug report, not a question. Ask questions on [discuss.ipfs.io](https://discuss.ipfs.io).
- [X] I have searched on the [issue tracker](https://github.com/ipfs/kubo/issues?q=is%3Aissue) for my bug.
- [X] I am running the latest [kubo version](https://dist.ipfs.tech/#kubo) or have an issue updating.
### Installation method
ipfs-update or dist.ipfs.tech
### Version
```Text
Kubo version: 0.20.0
Repo version: 13
System version: arm64/darwin
Golang version: go1.19.8
```
### Config
```json
{
"API": {
"HTTPHeaders": {}
},
"Addresses": {
"API": "/ip4/127.0.0.1/tcp/5001",
"Announce": [],
"AppendAnnounce": [],
"Gateway": "/ip4/127.0.0.1/tcp/8080",
"NoAnnounce": [],
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001",
"/ip4/0.0.0.0/udp/4001/quic",
"/ip4/0.0.0.0/udp/4001/quic-v1",
"/ip4/0.0.0.0/udp/4001/quic-v1/webtransport",
"/ip6/::/udp/4001/quic",
"/ip6/::/udp/4001/quic-v1",
"/ip6/::/udp/4001/quic-v1/webtransport"
]
},
"AutoNAT": {},
"Bootstrap": [
"/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
"/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa"
],
"DNS": {
"Resolvers": {}
},
"Datastore": {
"BloomFilterSize": 0,
"GCPeriod": "1h",
"HashOnRead": false,
"Spec": {
"mounts": [
{
"child": {
"path": "blocks",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
"sync": true,
"type": "flatfs"
},
"mountpoint": "/blocks",
"prefix": "flatfs.datastore",
"type": "measure"
},
{
"child": {
"compression": "none",
"path": "datastore",
"type": "levelds"
},
"mountpoint": "/",
"prefix": "leveldb.datastore",
"type": "measure"
}
],
"type": "mount"
},
"StorageGCWatermark": 90,
"StorageMax": "10GB"
},
"Discovery": {
"MDNS": {
"Enabled": true
}
},
"Experimental": {
"AcceleratedDHTClient": false,
"FilestoreEnabled": false,
"GraphsyncEnabled": false,
"Libp2pStreamMounting": false,
"OptimisticProvide": false,
"OptimisticProvideJobsPoolSize": 0,
"P2pHttpProxy": false,
"StrategicProviding": false,
"UrlstoreEnabled": false
},
"Gateway": {
"APICommands": [],
"HTTPHeaders": {
"Access-Control-Allow-Headers": [
"X-Requested-With",
"Range",
"User-Agent"
],
"Access-Control-Allow-Methods": [
"GET"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"NoDNSLink": false,
"NoFetch": false,
"PathPrefixes": [],
"PublicGateways": null,
"RootRedirect": ""
},
"Identity": {
"PeerID": "12D3KooWNLgBDmPgwLvZKh6RVTXtXrzRdm26oWxiuSYwoqifqXxr"
},
"Internal": {},
"Ipns": {
"RecordLifetime": "",
"RepublishPeriod": "",
"ResolveCacheSize": 128
},
"Migration": {
"DownloadSources": [],
"Keep": ""
},
"Mounts": {
"FuseAllowOther": false,
"IPFS": "/ipfs",
"IPNS": "/ipns"
},
"Peering": {
"Peers": null
},
"Pinning": {
"RemoteServices": {}
},
"Plugins": {
"Plugins": null
},
"Provider": {
"Strategy": ""
},
"Pubsub": {
"DisableSigning": false,
"Router": ""
},
"Reprovider": {},
"Routing": {
"Methods": null,
"Routers": null
},
"Swarm": {
"AddrFilters": null,
"ConnMgr": {},
"DisableBandwidthMetrics": false,
"DisableNatPortMap": false,
"RelayClient": {},
"RelayService": {},
"ResourceMgr": {
"Limits": {}
},
"Transports": {
"Multiplexers": {},
"Network": {},
"Security": {}
}
}
}
```
### Description
Trying to debug a speed issue in a transfer between two nodes, locally connected in wifi (one `0.20.0`, one `0.19.0`). I tried disconnecting from `quic` to isolate, and reconnect w/ tcp. But no, kubo disregards the user commands and insists on using quic. Disregarding clear user commands and intent is not a feature -- it is a bug.
```sh
# find the relevant peer id
> ipfs swarm peers | grep 192.168
/ip4/192.168.1.179/udp/4001/quic-v1/p2p/12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj
# get the peer version
> ipfs id 12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj | grep Version
"AgentVersion": "kubo/0.19.0/desktop",
"ProtocolVersion": "ipfs/0.1.0",
# get the peer tcp addr
> ipfs id 12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj | grep tcp
"/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj",
"/ip4/192.168.1.179/tcp/4001/p2p/12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj",
"/ip4/85.94.113.87/tcp/15448/p2p/12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj",
"/ip6/::1/tcp/4001/p2p/12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj",
# disconnect from quic
> ipfs swarm disconnect /ip4/192.168.1.179/udp/4001/quic-v1/p2p/12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj
disconnect 12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj success
# verify there's no connection now.
> ipfs swarm peers | grep 192.168
> ipfs swarm peers | grep 192.168
# ok, now connect to tcp addr
> ipfs swarm connect /ip4/192.168.1.179/tcp/4001/p2p/12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj
connect 12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj success
# check the addr i'm connected to
> ipfs swarm peers | grep 192.168
/ip4/192.168.1.179/udp/4001/quic-v1/p2p/12D3KooWBzbvHxkV3kBt8TPuMjGwknwsmCyMuy5uBAVPT8NarRXj
```

Contributor guide
Assessment
This issue has not been assessed yet.