Don't announce any addresses with temporary repo#193
Open
davidebeatrici wants to merge 1 commit intoipfs:masterfrom
Open
Don't announce any addresses with temporary repo#193davidebeatrici wants to merge 1 commit intoipfs:masterfrom
davidebeatrici wants to merge 1 commit intoipfs:masterfrom
Conversation
Previously all detected IP addresses were announced! In addition to being a potentially serious privacy/security issue, that behavior poisons content retrieval because the node is only alive as long as download is in progress.
davidebeatrici
added a commit
to OpenMandrivaAssociation/ipget
that referenced
this pull request
Jan 24, 2026
davidebeatrici
added a commit
to OpenMandrivaAssociation/ipget
that referenced
this pull request
Jan 24, 2026
Author
|
After checking Kubo's code, I'm not sure this is the correct approach: https://github.com/ipfs/kubo/blob/5ccdcdd4fca6654374e28d4ef4a16746c67e1938/config/addresses.go package config
// Addresses stores the (string) multiaddr addresses for the node.
type Addresses struct {
Swarm []string // addresses for the swarm to listen on
Announce []string // swarm addresses to announce to the network, if len > 0 replaces auto detected addresses
AppendAnnounce []string // similar to Announce but doesn't overwrite auto detected addresses, they are just appended
NoAnnounce []string // swarm addresses not to announce to the network
API Strings // address for the local API (RPC)
Gateway Strings // address to listen on for IPFS HTTP object gateway
}https://github.com/ipfs/kubo/blob/5ccdcdd4fca6654374e28d4ef4a16746c67e1938/config/init.go#L102-L120 func addressesConfig() Addresses {
return Addresses{
Swarm: []string{
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001",
"/ip4/0.0.0.0/udp/4001/webrtc-direct",
"/ip4/0.0.0.0/udp/4001/quic-v1",
"/ip4/0.0.0.0/udp/4001/quic-v1/webtransport",
"/ip6/::/udp/4001/webrtc-direct",
"/ip6/::/udp/4001/quic-v1",
"/ip6/::/udp/4001/quic-v1/webtransport",
},
Announce: []string{},
AppendAnnounce: []string{},
NoAnnounce: []string{},
API: Strings{"/ip4/127.0.0.1/tcp/5001"},
Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"},
}
}For reference, I discovered this issue because the ephemeral node with all IPv6 and IPv4 addresses of the machine I used to test ipget showed up on https://check.ipfs.network. After applying this patch and fetching other CIDs it didn't seem to happen again. What concerns me is that Kubo explicitly sets the IPv6 and IPv4 wildcards for each protocol in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously all detected IP addresses were announced!
In addition to being a potentially serious privacy/security issue, that behavior poisons content retrieval because the node is only alive as long as download is in progress.