Skip to content

Commit

Permalink
Merge pull request #223 from freedomofpress/abc-no-subdomain
Browse files Browse the repository at this point in the history
Add second onion name for abc.au
  • Loading branch information
nathandyer authored Jan 31, 2025
2 parents 83a8831 + e62b0e1 commit 7d96505
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 7 deletions.
Binary file added default.rulesets.1738357961.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>
<a href='rulesets-signature.1737649904.sha256'>rulesets-signature.1737649904.sha256</a><br>
<a href='rulesets-signature.1738357961.sha256'>rulesets-signature.1738357961.sha256</a><br>
<a href='latest-rulesets-timestamp'>latest-rulesets-timestamp</a><br>
<a href='default.rulesets.1737649904.gz'>default.rulesets.1737649904.gz</a><br>
<a href='default.rulesets.1738357961.gz'>default.rulesets.1738357961.gz</a><br>
</html>
2 changes: 1 addition & 1 deletion latest-rulesets-timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1737649904
1738357961
1 change: 1 addition & 0 deletions onboarded.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ primary_domain,sd_rewrite_rule,is_https
theintercept.com,theintercept.securedrop.tor.onion
www.theguardian.com,theguardian.securedrop.tor.onion
www.abc.net.au,abc.au.securedrop.tor.onion
www.abc.net.au,abcau.securedrop.tor.onion
espenandersen.no,espena.securedrop.tor.onion
www.nytimes.com,nytimes.securedrop.tor.onion,yes
techcrunch.com,techcrunch.securedrop.tor.onion
Expand Down
Binary file added rulesets-signature.1738357961.sha256
Binary file not shown.
5 changes: 5 additions & 0 deletions rulesets/abc-legacy-securedrop-ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ruleset name="ABC legacy">
<target host="abc.au.securedrop.tor.onion" />
<rule from="^http[s]?://abc.au.securedrop.tor.onion"
to="http://dqa4zahticcobfq5rmmmbewbdtyiznbl75hu23k4i37y7yfoosrh7mqd.onion" />
</ruleset>
4 changes: 2 additions & 2 deletions rulesets/abc-securedrop-ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ruleset name="ABC">
<target host="abc.au.securedrop.tor.onion" />
<rule from="^http[s]?://abc.au.securedrop.tor.onion"
<target host="abcau.securedrop.tor.onion" />
<rule from="^http[s]?://abcau.securedrop.tor.onion"
to="http://dqa4zahticcobfq5rmmmbewbdtyiznbl75hu23k4i37y7yfoosrh7mqd.onion" />
</ruleset>
2 changes: 1 addition & 1 deletion rulesets/default.rulesets

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion sddir.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,16 @@ def write_custom_ruleset(
onion_addr=onion_addr,
)
)
# Temporary workaround to allow abc.au to have two domains
# while we migrate from abc.au to abcau (see #219, #222).
if sd_rewrite_rule == "abc.au.securedrop.tor.onion":
slug = "abc-legacy"
else:
slug = directory_entry["slug"]

RULESET_OUTPUT = "securedrop-ruleset.xml"
with open(
os.path.join(RULESET_DIR, directory_entry["slug"] + "-" + RULESET_OUTPUT),
os.path.join(RULESET_DIR, slug + "-" + RULESET_OUTPUT),
"w",
) as f:
f.write(ruleset)
Expand Down

0 comments on commit 7d96505

Please sign in to comment.