Skip to content

Commit

Permalink
update Tor authority ips
Browse files Browse the repository at this point in the history
  • Loading branch information
toralf committed Jul 12, 2024
1 parent 8267bf0 commit 629e60f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ipv4-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function addCommon() {

for relay in $*; do
relay_2_ip_and_port
$ipt -A INPUT -p tcp --dst $orip --dport $orport -m length --length 40:60 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT || break
$ipt -A INPUT -p tcp --dst $orip --dport $orport -m length --length 40:60 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
done
$ipt -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

Expand Down Expand Up @@ -91,12 +91,12 @@ function __fill_trustlist() {
# snowflakes
echo 193.187.88.42 193.187.88.43 193.187.88.44 193.187.88.45 193.187.88.46 141.212.118.18
# Tor authorities
echo 45.66.33.45 66.111.2.131 217.196.147.77 128.31.0.39 131.188.40.189 171.25.193.9 193.23.244.244 199.58.81.140 216.218.219.41
echo 45.66.35.11 66.111.2.131 128.31.0.39 131.188.40.189 171.25.193.9 193.23.244.244 199.58.81.140 204.13.164.118 216.218.219.41 217.196.147.77
getent ahostsv4 snowflake-01.torproject.net. snowflake-02.torproject.net. | awk '{ print $1 }' | sort -u
if relays=$(curl -s 'https://onionoo.torproject.org/summary?search=flag:authority' -o -); then
if [[ $relays =~ 'relays_published' ]]; then
jq -r '.relays[] | .a[0]' <<<$relays |
grep -F '.'
sort
fi
fi
) |
Expand Down
7 changes: 4 additions & 3 deletions ipv6-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function addCommon() {

for relay in $*; do
relay_2_ip_and_port
$ipt -A INPUT -p tcp --dst $orip --dport $orport -m length --length 40:60 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT || break
$ipt -A INPUT -p tcp --dst $orip --dport $orport -m length --length 40:60 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
done
$ipt -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

Expand Down Expand Up @@ -99,12 +99,13 @@ function __fill_trustlist() {
# snowflakes
echo 2607:f018:600:8:be30:5bff:fef1:c6fa 2a0c:dd40:1:b::42
# Tor authorities
echo 2620:13:4000:6000::1000:118 2001:678:558:1000::244 2610:1c0:0:5::131 2001:67c:289c::9 2001:470:164:2::2 2001:638:a000:4140::ffff:189 2a02:16a8:662:2203::1
echo 2001:470:164:2::2 2001:638:a000:4140::ffff:189 2001:678:558:1000::244 2001:67c:289c::9 2610:1c0:0:5::131 2620:13:4000:6000::1000:118 2a02:16a8:662:2203::1
getent ahostsv6 snowflake-01.torproject.net. snowflake-02.torproject.net. | awk '{ print $1 }' | sort -u
if relays=$(curl -s 'https://onionoo.torproject.org/summary?search=flag:authority' -o -); then
if [[ $relays =~ 'relays_published' ]]; then
jq -r '.relays[] | .a | select(length > 1) | .[1:]' <<<$relays |
tr ',' '\n' | grep -F ':' | tr -d ']["'
tr ',' '\n' | grep -F ':' | tr -d ']["' |
sort
fi
fi
) |
Expand Down

0 comments on commit 629e60f

Please sign in to comment.