Skip to content

Commit

Permalink
Merge pull request #482 from ipfs/chore/clarify-legacy-doublehash-ipns
Browse files Browse the repository at this point in the history
denylists: clarify doublehash way of supporting IPNS
  • Loading branch information
lidel authored Sep 3, 2024
2 parents 5814b25 + 2f3c3cc commit 95f156b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/compact-denylist-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Compact Denylist Format
description: >
How content blocking rules can be represented as a .deny file.
date: 2023-10-25
date: 2023-08-24
maturity: reliable
editors:
- name: Hector Sanjuan
Expand Down Expand Up @@ -157,6 +157,10 @@ hints:
# blocks only this CID
//d9d295bde21f422d471a90f2a37ec53049fdf3e5fa3ee2e8f20e10003da429e7

# Legacy DNSLink double-hash block
# sha256(bad-domain-name.tld/)
//c555c4de78827ba42527dd3dc5398db38d6c0a8c345a88e0158b2d100f317e50

# Legacy Path double-hash block
# Blocks bafybeiefwqslmf6zyyrxodaxx4vwqircuxpza5ri45ws3y5a62ypxti42e/path
# but not any other paths.
Expand Down Expand Up @@ -363,6 +367,10 @@ Doublehash-Rule: Blocks using double-hashed item, which can be:
function, which makes is inferior to the modern and more future-proof
b58-encoded multihash notation which supports use of alternative hash
functions.
- If necessary, CID blocks can be applied to IPNS namespace:
- IPNS Names work out of the box when represented as `CIDV1_LIBP2P-KEY_BASE32/`.
- DNSLink rule can be enforced if matching sha256-hex-encoded hash
of `dnslink.domain.example.com/` (domain with with trailing slash).

In a case where implementation cannot distinguish a double-hashed rule between
a b58btc multihash (modern) and a sha256 hex-string (legacy), content blocking
Expand Down

0 comments on commit 95f156b

Please sign in to comment.