-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipns:// should respect DNS resolver settings #22409
Comments
cc @spylogsster thoughts on wiring this up? |
someone should double check that IPFS / IPNS / unstoppable domains / ENS are all still disabled in Tor windows, otherwise there is potentially a Tor DNS leak here. |
Verification
|
Brave | 1.43.70 Chromium: 104.0.5112.81 (Official Build) beta (x86_64) |
---|---|
Revision | 5b7b76419d50f583022568b6764b630f6ddc9208-refs/branch-heads/5112@{#1309} |
OS | macOS Version 11.6.8 (Build 20G730) |
Confirmed DNS queries used the specified DNS-over-HTTP provider, which in my case was Cloudflare.
Case 1: IPFS/IPNS URLs - PASSED
- installed
1.43.70
- launched Brave
- loaded each of the following IPFS/IPNS URLs:
IPFS URLs:
ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html#Life
ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/
ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Tokyo_National_Museum.html
ipfs:QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme
IPNS URLs:
ipns://en.wikipedia-on-ipfs.org/wiki/Tokyo#Islands
ipns://docs.ipfs.io
ipns://brantly.eth (Ethereum Name Service/ENS)
ipns://brad.crypto (Unstoppable Domains)
IPFS
1 | 2 | 3 | 4 |
---|---|---|---|
IPNS
1 | 2 | 3 | 4 |
---|---|---|---|
Case 2: Secure DNS - PASSED
- installed
1.43.70
- launched Brave
- loaded
brave://settings/security
- flipped
Use secure DNS
toEnabled
- selected
With Cloudflare (1.1.1.1)
- loaded each of the following IPFS/IPNS URLs:
IPFS URLs:
ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html#Life
ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/
ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Tokyo_National_Museum.html
ipfs:QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme
IPNS URLs:
ipns://en.wikipedia-on-ipfs.org/wiki/Tokyo#Islands
ipns://docs.ipfs.io
ipns://brantly.eth (Ethereum Name Service/ENS)
ipns://brad.crypto (Unstoppable Domains)
IPFS
1 | 2 | 3 | 4 |
---|---|---|---|
IPNS
1 | 2 | 3 | 4 |
---|---|---|---|
Case 3: Custom DNS resolver - N/A
Done in #23831 👍 |
Verification
|
Brave | 1.43.78 Chromium: 104.0.5112.102 (Official Build) beta (x86_64) |
---|---|
Revision | 8e5396254975ef939f2ef7d0bd334e48a052b536-refs/branch-heads/5112@{#1478} |
OS | macOS Version 11.6.8 (Build 20G730) |
Case 1: no DoH override: loading IPFS and IPNS URLs works and there are DNS requests with *_dnslink.<ipns part>
- installed
1.43.x
- launched Brave
- loaded
brave://ipfs
- clicked
Install and restart
- shut Brave down
- launched Wireshark
- filtered for
dns
- loaded
ipns://brantly.eth
(ENS) - loaded
ipns://brad.crypto
(Unstoppable Domains) - loaded
ipns://en.wikipedia-on-ipfs.org/wiki/Asia/#Economy
- loaded
ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Tokyo_National_Museum.html
step 8 | step 9 | step 10 | step 11 |
---|---|---|---|
Case 2: DoH override: loading IPFS and IPNS URLs works and there are no DNS requests with *_dnslink.<ipns part>
- installed
1.43.x
- launched Brave
- loaded
brave://ipfs
- clicked
Install and restart
- shut Brave down
- removed the following from the
config
file in thebrave_ipfs
folder: "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ","/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
- set
With NextDNS
inbrave://settings/security
- launched Wireshark
- filtered for
dns
- loaded
ipns://brantly.eth
(ENS) - loaded
ipns://brad.crypto
(Unstoppable Domains) - loaded
ipns://en.wikipedia-on-ipfs.org/wiki/Asia/#Economy
- loaded
ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Tokyo_National_Museum.html
step 11 | step 12 | step 13 | step 14 |
---|---|---|---|
Confirmed DNS lookups went to my selected DoH provider, NextDNS.
Confirmed I didn’t see any DNS requests to *dnslink.
Case 3: Invalid DoH override: IPNS URLs don't load
- installed
1.43.x
- launched Brave
- loaded
brave://ipfs
- clicked
Install and restart
- set
With Custom
inbrave://settings/security
tohttps://a.b.c.d
- loaded
ipns://brantly.eth
(ENS) - loaded
ipns://brad.crypto
(Unstoppable Domains) - loaded
ipns://en.wikipedia-on-ipfs.org/wiki/Asia/#Economy
- loaded
ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Tokyo_National_Museum.html
step 6 | step 7 | step 8 | step 9 |
---|---|---|---|
Confirmed when DoH server is clearly wrong, IPNS resolution doesn't work
Some related issues found in Kubo: |
Should this be reopened? |
Problem
If Brave user decides to use custom DNS over HTTPS resolver via UI below, go-ipfs does not respect that choice, and uses cleartext resolver provided by the OS.
Proposed change
Every time custom DNS over HTTPS resolver is set via the UI in "Privacy and security" settings, Brave should add/update
.
(top-level resolver) inDNS.Resolvers
map in the$IPFS_PATH/config
file.Making changes to this map requires node reboot for changes to be applied
The text was updated successfully, but these errors were encountered: