Add Troll Patrol to Lox
Addresses: #57
This MR brings in @vecna's work on Troll Patrol, a system for automatically detecting censorship of Tor bridges. The Troll patrol system infers bridge reachability based on already-existing bridge usage statistics and novel anonymous user reports of bridge blockage.
The work reflected in this MR includes the original troll-patrol repo being brought in to the Lox workspace as well as corresponding changes to the existing Lox related crates. Additional work includes:
- modifications based on results from the paper (removing positive reports since they were not shown to be effective)
- updates to bring Troll patrol into sync with the current state of Lox.
- removing test and simulation code for the time being (though it may be the case that running a simulation is the best way to test that this works as we expect).
Note too that these changes will break the db structure so a new deployment that involves deleting the existing loxdb will be required.
Merge request reports
Activity
added Anti-Censorship label
requested review from @cohosh
assigned to @onyinyang
added 9 commits
-
a6ca80e2...7bbef236 - 8 commits from branch
tpo/anti-censorship:main
- 9bf631af - Merge branch 'main' into 'troll-patrol'
-
a6ca80e2...7bbef236 - 8 commits from branch
added 15 commits
- 9bf631af...327f05be - 5 earlier commits
- fe8b3620 - Artificially advance time on BridgeDb
- eab891fa - Move (unhashed) fingerprint to field in BridgeLine
- 6561619f - Add function to BridgeLine to get hashed fingerprint
- 506da3a9 - Change troll patrol fingerprint to hashed_fingerprint
- 83eae066 - Add bridge_verification_info to lox-library
- 18f36ea7 - Implement Troll Patrol handler
- 58059223 - Add functions to generate troll-patrol info in lox components
- 9e60d16f - Minor clean up to bridge_table and wasm
- 47834578 - Simplify troll patrol functions for context and keys
- 0b56f6f2 - Move troll-patrol command into command.rs
Toggle commit listadded 13 commits
- 0b56f6f2...0aa988a5 - 3 earlier commits
- 44a5d84c - Remove positive report logic from Troll Patrol
- cb0dc384 - Update troll-patrol dependencies
- e349c59b - Convert troll patrol to hyper v1
- df9adca5 - Artificially advance time on BridgeDb
- ff06dc97 - Move (unhashed) fingerprint to field in BridgeLine
- ee1ed1b1 - Add function to BridgeLine to get hashed fingerprint
- 86cb31b3 - Change troll patrol fingerprint to hashed_fingerprint
- 1575ef6b - Add bridge_verification_info to lox-library
- 8f51c513 - Implement Troll Patrol handler
- 519307b4 - Add functions to generate troll-patrol info in lox components
Toggle commit listadded 1 commit
- 70581d42 - Simplify troll patrol functions for context and keys
added 1 commit
- 96cdbcb7 - Reduce max_threshold and fixup harshness value
mentioned in issue #57
169 175 170 176 #[test] 171 177 fn test_write_context() { 178 // TODO: Fix db_test_file.json changed this line in version 14 of the diff
1 use super::bridge_table::BridgeLine; 1 2 use curve25519_dalek::Scalar; 2 use ed25519_dalek::VerifyingKey; 3 use lox_library::bridge_table::BridgeLine; 4 3 use serde::{Deserialize, Serialize}; 5 4 use std::collections::HashSet; 6 5 7 6 /// Information that needs to be known to verify a Troll Patrol report 8 #[derive(Debug, Serialize, Deserialize)] 7 #[derive(Debug, Clone, Serialize, Deserialize)] 30 30 let resource_uid = resource 31 31 .get_uid() 32 32 .expect("Unable to get Fingerprint UID of resource"); 33 let hashed_fingerprint: [u8; 20] = array_bytes::hex2array(&resource.fingerprint).expect("Failed to parse bridge fingerprint"); 34 let infostr: String = format!( 35 "type={} params={:?}", 36 resource.r#type, resource.params, 37 ); 33 let hashed_fingerprint: [u8; 20] = array_bytes::hex2array(&resource.fingerprint) 34 .expect("Failed to parse bridge fingerprint"); 35 let infostr: String = format!("type={} params={:?}", resource.r#type, resource.params,);