Implement the circumvention nettest group

Only Psiphon for now. Closes #87 #77.
This commit is contained in:
Simone Basso
2019-12-28 17:48:07 +01:00
parent 5e868fe043
commit 259ab41b15
9 changed files with 70 additions and 74 deletions
+4
View File
@@ -149,6 +149,10 @@ func init() {
middleboxCmd.Action(func(_ *kingpin.ParseContext) error {
return runNettestGroup("middlebox", ctx, network)
})
circumventionCmd := cmd.Command("circumvention", "")
circumventionCmd.Action(func(_ *kingpin.ParseContext) error {
return runNettestGroup("circumvention", ctx, network)
})
allCmd := cmd.Command("all", "").Default()
allCmd.Action(func(_ *kingpin.ParseContext) error {
log.Infof("Running %s tests", color.BlueString("all"))
+7
View File
@@ -69,6 +69,13 @@ var summarizers = map[string]func(uint64, uint64, string) []string{
"",
}
},
"circumvention": func(totalCount uint64, anomalyCount uint64, ss string) []string {
return []string{
fmt.Sprintf("Detected: %v", anomalyCount > 0),
"",
"",
}
},
}
func makeSummary(name string, totalCount uint64, anomalyCount uint64, ss string) []string {