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.
fix(webconnectivitylte): add classic and tcptls_experiment tags (ooni…
…#1502) Closes ooni/probe#2673 Part of ooni/probe#2666
- Loading branch information
1 parent
80a87a6
commit c6b0a2c
Showing
53 changed files
with
405 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package webconnectivitylte | ||
|
||
import "fmt" | ||
|
||
// generateTagsForEndpoints generates the tags for the endpoints. | ||
func generateTagsForEndpoints(depth int64, ps *prioritySelector, classic bool) (output []string) { | ||
// The classic flag marks all observations using IP addresses | ||
// fetched using the system resolver. Strictly speaking classic | ||
// means that these measurements derive from the resolver that | ||
// we consider primary, and for us it it the system one. | ||
if classic { | ||
output = append(output, "classic") | ||
} | ||
|
||
// The depth=0|1|... tag indicates the current redirect depth. | ||
// | ||
// When the depth is zero, we also include the tcptls_experiment tag | ||
// for backwards compatibility with Web Connectivity v0.4. | ||
if depth < 1 { | ||
output = append(output, "tcptls_experiment") | ||
} | ||
output = append(output, fmt.Sprintf("depth=%d", depth)) | ||
|
||
// The fetch_body=true|false tag allows to distinguish between observations | ||
// with the objective of fetching the body and extra observations. For example, | ||
// for http:// requests we perform TLS handshakes for the purpose of checking | ||
// whether IP addresses are valid without fetching the body. | ||
output = append(output, fmt.Sprintf("fetch_body=%v", ps != nil)) | ||
|
||
return output | ||
} |
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
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
Oops, something went wrong.