Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions test-specs/ts-012-lantern.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Specification version number

2015-04-03-000
0.1.0

# Specification name

Expand All @@ -17,18 +17,19 @@ Ability to measure whether Lantern is working from the given network vantage poi

# Expected inputs

A single URL to fetch, supplied by command line argument "--url (-u)". To test
Lantern, it must be a URL from the whitelisted set.
See: https://github.com/getlantern/flashlight/blob/master/genconfig/proxiedsites/
None

# Test description

This test launches Lantern in --headless mode, and parses output to determine
if it has bootstrapped. After bootstrap, it fetches the URL supplied by the
--url option using Lanterns http proxy interface listening on 127.0.0.1.8787.
if it has bootstrapped. After bootstrap, it fetches a URL using Lanterns HTTP
proxy interface listening on 127.0.0.1.8787 and checks to see if the response
body matches the expected result.
As a URL for testing we use http://www.google.com/humans.txt and look for the
string "Google is built by a large" in the response body.

The specific string used to determine bootstrap from Lantern output in version
"2.0.10" is "Connected to proxy on localhost" from standard output.
"2.0.10" is "Successfully dialed via" from standard output.

# Expected output

Expand Down Expand Up @@ -67,18 +68,18 @@ failure:
'lantern --headless':
'stdout' - Contents of standard output produced by Lantern.
'stderr' - Contents of standard error produced by Lantern.

'default_configuration' - True or False - whether it is using the default, sane, configuration or not

## Possible conclusions

We can determine whether or not Lantern is able to bootstrap, according to its output.
We can determine whether or not a given URL is reachable via Lantern.
We can determine whether or not a URL is reachable via Lantern.

## Example output sample
```
---
input_hashes: []
options: [-u, google.com]
options: []
probe_asn: AS1234
probe_cc: US
probe_city: null
Expand All @@ -87,19 +88,21 @@ software_name: ooniprobe
software_version: 1.2.3-rc1
start_time: 1428344311.0
test_name: lantern_circumvention_tool_test
test_version: 0.0.1
test_version: 0.1.0
...
---
body: "<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\"\
>\n<TITLE>301 Moved</TITLE></HEAD><BODY>\n<H1>301 Moved</H1>\nThe document has moved\n\
<A HREF=\"http://www.google.com/\">here</A>.\r\n</BODY></HTML>\r\n"
body: "Google is built by a large team of engineers, designers, researchers, robots, and others in many different sites across the globe. It is updated continuously, and built with more tools and technologies than we can shake a stick at. If you'd like to help us out, see google.com/careers."
bootstrapped: true
default_configuration: true
input: null
lantern --headless: {exit_reason: process_done, stderr: '', stdout: ''}
```

## Expected Post-processing efforts

You should be aware of the `default_confguration` parameter as the user may
have misconfigured the test leading to inconsistent results.

# Privacy considerations

Lantern does not seek to provide anonymity. Lantern contains tracking analytics
Expand Down
30 changes: 19 additions & 11 deletions test-specs/ts-014-psiphon.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Specification version number

2015-10-11-000
0.1.0

# Specification name

Psiphon Test

# Test preconditions

Have psiphon-circumvention-system (including psiphon-circumvention-system/pyclient/psi_client.py) cloned in the home of the user that runs ooni or somewhere else accessible to the user that runs ooni.
Have psiphon-circumvention-system (including
psiphon-circumvention-system/pyclient/psi_client.py) cloned in the home of the
user that runs ooni or somewhere else accessible to the user that runs ooni.

# Expected impact

Expand All @@ -17,13 +19,17 @@ Ability to measure whether Psiphon is working from the given network vantage poi
# Expected inputs

Optionally:
A single URL to fetch, supplied by command line argument "--url (-u)".
Psiphon path, specified by the command line argument "--psiphonpath (-p)"
The ip:port that Psiphon will use for the SOCKS proxy, with the command line argument "--socksproxy (-s)"

# Test description

This test first check that the Psiphon path exists, then launches Psiphon and parses output to determine if it has bootstrapped. After bootstrap, it fetches google.com (or other URL specified by the --url argument) using Psiphons SOCKS proxy listening on 127.0.0.1:1080 (or otherwise specified by the --socksproxy argument).
This test first check that the Psiphon path exists, then launches Psiphon and
parses output to determine if it has bootstrapped. After bootstrap, it fetches
`http://www.google.com/humans.txt` using Psiphons SOCKS
proxy listening on 127.0.0.1:1080 (or otherwise specified by the --socksproxy
argument).
It will then check to see if the response body contains the string: "Google is built by a large"

The specific string used to determine bootstrap from Psiphon output in version
"0.0.1" is "Press Ctrl-C to terminate." from standard output.
Expand Down Expand Up @@ -62,19 +68,19 @@ stderr:
'/tmp/<temporary file>':
'stdout' - Contents of standard output produced by Psiphon.
'stderr' - Contents of standard error produced by Psiphon.

'default_configuration' - True or False - whether it is using the default, sane, configuration or not

## Possible conclusions

We can determine whether or not Psiphon is found.
We can determine whether or not Psiphon is able to bootstrap, according to its output.
We can determine whether or not a given URL is reachable via Psiphon.
We can determine whether or not a URL is reachable via Psiphon.

## Example output sample
```
---
input_hashes: []
options: [-u, google.com]
options: []
probe_asn: AS0
probe_cc: ZZ
probe_city: null
Expand All @@ -94,6 +100,7 @@ test_version: 0.0.1
agent: agent
input: null
psiphon_installed: true
default_configuration: true
requests:
- request:
body: null
Expand All @@ -102,9 +109,7 @@ requests:
tor: {is_tor: false}
url: http://google.com
response:
body: "<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\"\
>\n<TITLE>301 Moved</TITLE></HEAD><BODY>\n<H1>301 Moved</H1>\nThe document has\
\ moved\n<A HREF=\"http://www.google.com/\">here</A>.\r\n</BODY></HTML>\r\n"
body: "Google is built by a large team of engineers, designers, researchers, robots, and others in many different sites across the globe. It is updated continuously, and built with more tools and technologies than we can shake a stick at. If you'd like to help us out, see google.com/careers."
code: 301
headers:
- - Content-Length
Expand Down Expand Up @@ -135,9 +140,12 @@ test_start_time: 1444686052.0

## Expected Post-processing efforts

You should be aware of the `default_confguration` parameter as the user may
have misconfigured the test leading to inconsistent results.

# Privacy considerations

Psiphon does not seek to provide anonymity.
Psiphon does not seek to provide anonymity.
An adversary can observe that a user is connecting to Psiphon servers.
Psiphon servers can also determine the users location.

Expand Down
195 changes: 195 additions & 0 deletions test-specs/ts-016-vanilla-tor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# Specification version number

0.1.0

# Specification name

Vanilla Tor Test

# Test preconditions

* An internet connection

* Tor is installed

# Expected impact

Ability to determine if Tor in it's default configuration is able to bootstrap
or at what point in bootstrapping it fails.

# Expected inputs

None

# Test description

The test will run the tor executable and monitor the standard
output looking for a line in it's output indicating it has
bootstrapped to 100%.

# Expected output

## Parent data format

None

## Required output data

A flag to indicate if we were able to establish a Tor connection.

## Semantics

error:
**string** indicating that an error occurred

timeout-reached: to indicate tor was unable to bootstrap in the allocated time.

null: no error was detected.

success:
**boolean** indiciating if whether or not we were able to connect to the
Tor network.

True: indicates that we reached 100% bootstrap

False: indicates that we were unable to reach 100% bootstrap before the
timeout was reached.

null: indicates that tor exited before we were able to complete the test,
this can be due to some unhandled error.


timeout:
**integer** indicating the timeout, in seconds, after which we should
consider Tor as not working. The default it is set to 200 seconds.

transport_name:
**string** always set to vanilla

tor_version:
**string** indicating the version string of the tor client being used.

tor_progress:
**integer** indicating the percentage of tor bootstrapping at which we
stopped.

tor_progress_tag:
**string** a string giving a textual description of what the progress
percentage means.

tor_progress_summary:
**string** a more verbose string giving a textual description of what the
progress percentage state is.

tor_log:
**string** notice level log output of tor.

## Possible conclusions

If Tor with the default configuration can successfully bootstrap.

## Example output sample

```
###########################################
# OONI Probe Report for vanilla_tor (0.1.0)
# Tue Mar 15 15:09:33 2016
###########################################
---
annotations: null
input_hashes: []
options: []
probe_asn: AS0
probe_cc: ZZ
probe_city: null
probe_ip: 127.0.0.1
report_id: wvKi9dtBJXFub4lBSwgcA0DZDiCJ38DRjhh3rYeBOwpwfJ0bfUznBLva5djRFOHR
software_name: ooniprobe
software_version: 1.3.2
start_time: 1458047373.0
test_helpers: {}
test_name: vanilla_tor
test_version: 0.1.0
...
---
{error: null, input: null, success: true, test_runtime: 7.101379871368408, test_start_time: 1458047374.0,
timeout: 200, tor_log: 'Mar 15 15:09:34.000 [notice] Tor 0.2.6.10 (git-58c51dc6087b0936)
opening new log file.

Mar 15 15:09:34.063 [warn] OpenSSL version from headers does not match the version
we''re running with. If you get weird crashes, that might be why. (Compiled with
1000204f: OpenSSL 1.0.2d 9 Jul 2015; running with 1000206f: OpenSSL 1.0.2f 28
Jan 2016).

Mar 15 15:09:34.064 [notice] Tor v0.2.6.10 (git-58c51dc6087b0936) running on Darwin
with Libevent 2.0.22-stable, OpenSSL 1.0.2f and Zlib 1.2.5.

Mar 15 15:09:34.082 [notice] Tor can''t help you if you use it wrong! Learn how
to be safe at https://www.torproject.org/download/download#warning

Mar 15 15:09:34.121 [notice] Configuration file "/non-existant" not present, using
reasonable defaults.

Mar 15 15:09:34.172 [notice] Opening Socks listener on 127.0.0.1:1886

Mar 15 15:09:34.173 [notice] Opening Control listener on 127.0.0.1:27345

Mar 15 15:09:34.000 [notice] Parsing GEOIP IPv4 file /usr/local/Cellar/tor/0.2.6.10/share/tor/geoip.

Mar 15 15:09:34.000 [notice] Parsing GEOIP IPv6 file /usr/local/Cellar/tor/0.2.6.10/share/tor/geoip6.

Mar 15 15:09:34.000 [notice] Bootstrapped 0%: Starting

Mar 15 15:09:34.000 [notice] New control connection opened from 127.0.0.1.

Mar 15 15:09:34.000 [notice] Tor 0.2.6.10 (git-58c51dc6087b0936) opening log file.

Mar 15 15:09:35.000 [notice] Bootstrapped 5%: Connecting to directory server

Mar 15 15:09:35.000 [notice] Bootstrapped 10%: Finishing handshake with directory
server

Mar 15 15:09:35.000 [notice] Bootstrapped 15%: Establishing an encrypted directory
connection

Mar 15 15:09:35.000 [notice] Bootstrapped 20%: Asking for networkstatus consensus

Mar 15 15:09:35.000 [notice] Bootstrapped 25%: Loading networkstatus consensus

Mar 15 15:09:36.000 [notice] I learned some more directory information, but not
enough to build a circuit: We have no usable consensus.

Mar 15 15:09:36.000 [notice] Bootstrapped 40%: Loading authority key certs

Mar 15 15:09:36.000 [notice] Bootstrapped 45%: Asking for relay descriptors

Mar 15 15:09:36.000 [notice] I learned some more directory information, but not
enough to build a circuit: We need more microdescriptors: we have 0/7138, and
can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw,
and 0% of exit bw = 0% of path bw.)

Mar 15 15:09:37.000 [notice] Bootstrapped 50%: Loading relay descriptors

Mar 15 15:09:38.000 [notice] Bootstrapped 57%: Loading relay descriptors

Mar 15 15:09:38.000 [notice] Bootstrapped 66%: Loading relay descriptors

Mar 15 15:09:39.000 [notice] Bootstrapped 72%: Loading relay descriptors

Mar 15 15:09:39.000 [notice] Bootstrapped 78%: Loading relay descriptors

Mar 15 15:09:39.000 [notice] Bootstrapped 80%: Connecting to the Tor network

Mar 15 15:09:39.000 [notice] Bootstrapped 90%: Establishing a Tor circuit

Mar 15 15:09:41.000 [notice] Tor has successfully opened a circuit. Looks like
client functionality is working.

Mar 15 15:09:41.000 [notice] Bootstrapped 100%: Done

Mar 15 15:09:41.000 [notice] Catching signal TERM, exiting cleanly.

', tor_progress: 100, tor_progress_summary: Done, tor_progress_tag: done, tor_version: 0.2.6.10,
transport_name: vanilla}
... ''}
```