forked from ooni/probe-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(enginenetx): enable the stats-based policy (ooni#1313)
This commit modifies the https-dialer policy we create to take into account stats to generate tactics. As of this commit, the overall policy is as follows: 1. if `$OONI_HOME/$engine_dir/httpsdialerstatic.conf` exists and contains entries for the endpoint's domain (e.g., "www.example.com:443"), then we unconditionally use it to generate tactics, otherwise; 2. we generate tactics using existing stats and filter only the tactics that are less than one week old (filtering done when loading from the kvstore) and have worked at least once, otherwise; 3. we generate tactics using known beacons and candidate SNIs with the extra caveat that we're not going to generate a tactic we have generate already in the previous step, otherwise; 4. we use whatever resolver is configured to lookup for the domain name and generate tactics doing the boring thing of using the resolved IP addrs along with the SNI being equal to the original domain. Note that this diff fixes a previously untested for bug caused by trying to obtain statistics for an unknow endpoint domain. Part of ooni/probe#2531
- Loading branch information
1 parent
18b383e
commit 519cce1
Showing
4 changed files
with
54 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters