How to Use the Command 'ooniprobe' (with examples)
Ooniprobe is a powerful command-line tool that facilitates the detection and measurement of internet censorship and network interference. Provided by the Open Observatory of Network Interference (OONI), this tool allows users to investigate the blocking of websites and apps, as well as assess their network’s speed and performance. Ooniprobe serves as a valuable resource for researchers, journalists, activists, or anyone interested in understanding the mechanics of online restrictions and network performance issues.
Use case 1: Listing All Tests Performed
Code:
ooniprobe list
Motivation: The ability to list all tests performed is crucial for users who need to track their past activities. It provides a clear historical record of the tests conducted, allowing users to analyze patterns over time or revisit previous results. This feature is particularly useful for researchers or analysts who need to maintain a comprehensive log of their investigative activities into network censorship.
Explanation:
list
: This argument tells Ooniprobe to display all previously conducted tests. It’s a straightforward command that retrieves and displays a log of every test that has been executed using the tool, offering a quick snapshot of historical data.
Example output:
1. Websites test - 2023-09-01
2. Performance test - 2023-09-03
3. Apps test - 2023-09-05
...
Use case 2: Showing Information About a Specific Test
Code:
ooniprobe list 7
Motivation: In situations where detailed insights into a specific test are required, knowing how to pull up information about that test is essential. Whether troubleshooting a network issue or analyzing the results of a particular investigation, having the ability to zoom into a specific test aids in drawing meaningful conclusions.
Explanation:
list
: Initiates the search for test logs.7
: This indicates the ID number of the test for which the information is requested. This assumes that the test of interest has been listed as number 7 from the list of all tests performed.
Example output:
Test ID: 7
Type: Websites test
Date: 2023-09-10
Status: Completed
Blocked Sites: [example.com, examplenews.com]
Use case 3: Running All Available Tests
Code:
ooniprobe run all
Motivation: This use case is perfect for comprehensive assessments. By executing all tests, users can attain a complete overview of network behavior and potential censorship. This one-command execution is convenient for users wanting a broad insight without manually selecting each test.
Explanation:
run
: Triggers the execution of tests.all
: Requests that every available test be executed, leaving no stone unturned in assessing network conditions.
Example output:
Starting all tests...
Websites test started...
Performance test started...
All tests completed successfully.
Use case 4: Performing a Specific Test
Code:
ooniprobe run performance
Motivation: Sometimes, users are only interested in particular aspects of network analysis, such as bandwidth limitations or latency issues. Running a specific test like the performance test helps users focus solely on aspects relevant to network speed and efficiency, providing targeted insights and diagnostics.
Explanation:
run
: Initiates the test execution.performance
: Specifies that the test to be executed is the performance test, which evaluates the speed and efficiency of the network.
Example output:
Running performance test...
Download speed: 50 Mbps
Upload speed: 10 Mbps
Latency: 20 ms
Performance test completed.
Use case 5: Checking the Availability of a Specific Website
Code:
ooniprobe run websites --input https://ooni.org/
Motivation: Frequently, users need to check the accessibility of a specific website due to suspicions of censorship or blocking. This command allows for pinpoint testing of a particular URL, assisting users in determining whether access issues are related to network interference or the site itself.
Explanation:
run
: Starts the test.websites
: Specifies the test type aimed at checking website accessibility.--input
: This argument is used to input a specific URL for testing.https://ooni.org/
: The URL of the website whose accessibility is being tested.
Example output:
Testing accessibility of https://ooni.org/...
Status: Accessible
No indications of blocking detected.
Use case 6: Checking Availability of All Websites Listed in a File
Code:
ooniprobe run websites --input-file path/to/my-websites.txt
Motivation: In many cases, users need to assess the availability of multiple websites at once. Such a task could be daunting if done individually, but with this feature, users can automate the testing of an entire list of URLs from a single file, saving time and ensuring comprehensive coverage.
Explanation:
run
: Initiates the test.websites
: Indicates that the websites accessibility test will be executed.--input-file
: Specifies an external file containing a list of URLs to be tested.path/to/my-websites.txt
: The file path where the list of websites to be tested is stored.
Example output:
Testing websites from file...
1. example1.com: Blocked in your region.
2. example2.org: Accessible.
3. example3.net: Timeout error.
...
All tests completed.
Use case 7: Displaying Detailed Information About a Test in JSON Format
Code:
ooniprobe show 9
Motivation: Accessing a detailed, structured report of test results in JSON format is invaluable for developers or professionals who need to integrate these results into systems, dashboards, or further data analysis. JSON’s structured format is optimal for both readability and data exchange.
Explanation:
show
: Requests detailed information about a specific test.9
: Represents the ID of the test for which detailed information is required.
Example output:
{
"test_id": 9,
"type": "Websites test",
"date": "2023-09-15",
"results": {
"blocked_websites": [
"example4.com",
"example5.org"
],
"accessible_websites": [
"example6.net"
]
},
"status": "Completed"
}
Conclusion:
Understanding the various functionalities of the ‘ooniprobe’ command-line tool can greatly aid anyone looking to delve into the intricacies of internet censorship and network performance. Each use case, with its clearly defined purpose and explanation, demonstrates how versatile and comprehensive Ooniprobe can be in delivering valuable insights about internet freedom and connectivity quality.