Skip to content
Snippets Groups Projects
Commit 770082bf authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Update criteria for partial/full IPv6 support.

parent 2cab2b49
No related branches found
No related tags found
No related merge requests found
# count relays
grep -c "^r " 2020-07-01-01-00-00-consensus
# count relays with IPv6 ORPort
grep -c "^a \[" 2020-07-01-01-00-00-consensus
# compute total consensus weight
grep "^w " 2020-07-01-01-00-00-consensus | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# compute consensus weight of relays with IPv6 ORPort
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# count relays with IPv6 ORPort and partial IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep "^v Tor 0.4.4.[1-9]" | sort | uniq -c
# count relays with IPv6 ORPort and full IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep -B1 "^pr.* Relay=..3" | grep "^v Tor 0.4.5" | sort | uniq -c
# compute consensus weight of relays with IPv6 ORPort and partial IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep -A2 "^v Tor 0.4.4.[1-9]" | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# compute consensus weight of relays with IPv6 ORPort and full IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep -C1 "^pr.* Relay=..3" | grep -A2 "^v Tor 0.4.5" | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# obtain subset of usable guards
grep -v "^s.* Exit" 2020-07-01-01-00-00-consensus | grep -B2 -A4 "^s.* Guard" > 2020-07-01-01-00-00-usable-guards
grep -B2 -A4 "^s.* BadExit.* Guard" 2020-07-01-01-00-00-consensus >> 2020-07-01-01-00-00-usable-guards
# count usable guards
grep -c "^r " 2020-07-01-01-00-00-usable-guards
# find Wgd value
grep Wgd 2020-07-01-01-00-00-consensus
# count usable guards with IPv6 ORPort
grep -c "^a \[" 2020-07-01-01-00-00-usable-guards
# compute usable guards consensus weight
grep "^w " 2020-07-01-01-00-00-usable-guards | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# compute consensus weight of usable guards with IPv6 ORPort
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# count usable guards with IPv6 ORPort and partial IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep "^v Tor 0.4.4.[1-9]" | sort | uniq -c
# count usable guards with IPv6 ORPort and full IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep -C1 "^pr.* Relay=..3" | grep "^v Tor 0.4.5" | sort | uniq -c
# compute consensus weight of usable guards with IPv6 ORPort and partial IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep -A2 "^v Tor 0.4.4.[1-9]" | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# compute consensus weight of usable guards with IPv6 ORPort and full IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep -C1 "^pr.* Relay=..3" | grep -A2 "^v Tor 0.4.5" | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
...@@ -78,7 +78,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -78,7 +78,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys, stem, stem.version, stem.descriptor import sys, stem, stem.version, stem.descriptor
partial_support_version = stem.version.Version('0.4.4') partial_support_version = stem.version.Version('0.4.4.1')
full_support_version = stem.version.Version('0.4.5') full_support_version = stem.version.Version('0.4.5')
def read(consensus_filename): def read(consensus_filename):
...@@ -120,7 +120,7 @@ def read(consensus_filename): ...@@ -120,7 +120,7 @@ def read(consensus_filename):
has_partial_support = False has_partial_support = False
has_full_support = False has_full_support = False
if relay.version: if relay.version:
if relay.version >= full_support_version: if "Relay" in relay.protocols and 3 in relay.protocols["Relay"] and relay.version >= full_support_version:
has_full_support = True has_full_support = True
if relay.version >= partial_support_version: if relay.version >= partial_support_version:
has_partial_support = True has_partial_support = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment