[tor-commits] [ooni-probe/master] Add preferred-backend command line option

art at torproject.org art at torproject.org
Sun Jul 10 20:22:57 UTC 2016


commit 45dc9638d321fac3e27e4dbf4aef69e1a62886d0
Author: Arturo Filastò <arturo at filasto.net>
Date:   Wed Jun 29 19:16:46 2016 +0200

    Add preferred-backend command line option
---
 ooni/oonicli.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ooni/oonicli.py b/ooni/oonicli.py
index c0ee5cd..e9038a4 100644
--- a/ooni/oonicli.py
+++ b/ooni/oonicli.py
@@ -57,6 +57,11 @@ class Options(usage.Options):
                                "directory."],
         ["annotations", "a", None, "Annotate the report with a key:value[, "
                                    "key:value] format."],
+        ["preferred-backend", "p", None, "Set the preferred backend to use "
+                                         "when submitting results and/or "
+                                         "communicating with test helpers. "
+                                         "Can be either onion, "
+                                         "https or cloudfront"],
         ["queue", "Q", None, "AMQP Queue URL amqp://user:pass@host:port/vhost/queue"]
     ]
 
@@ -385,6 +390,9 @@ def runWithDirector(global_options):
     if global_options.get('annotations') is not None:
         global_options['annotations'] = setupAnnotations(global_options)
 
+    if global_options.get('preferred-backend') is not None:
+        config.advanced.preferred_backend = global_options['preferred-backend']
+
     if global_options['no-collector']:
         log.msg("Not reporting using a collector")
         global_options['collector'] = None





More information about the tor-commits mailing list