[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Feature/http n https (#770)



commit ff1880092e8cf8777b769e152675edf7e2d7641b
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Thu Jun 15 12:05:11 2017 +0200

    Feature/http n https (#770)
    
    * Add support for testing via http when the site is https
    
    * Clarify scope of `--no-http` settings
---
 ooni/nettests/blocking/web_connectivity.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ooni/nettests/blocking/web_connectivity.py b/ooni/nettests/blocking/web_connectivity.py
index 3807a0de..a4db157e 100644
--- a/ooni/nettests/blocking/web_connectivity.py
+++ b/ooni/nettests/blocking/web_connectivity.py
@@ -39,6 +39,7 @@ class UsageOptions(usage.Options):
     ]
     optFlags = [
         ['no-shuffle', '', 'Disable shuffling of URLs'],
+        ['no-http', '', 'Disable testing also http for https sites specified in the test list (i.e. if you specify `-u <URL>` _only_ that <URL> will be tested)'],
     ]
 
 
@@ -52,7 +53,7 @@ class WebConnectivityTest(httpt.HTTPTest, dnst.DNSTest):
                    "connect to the resolved IPs and then fetching the page "
                    "and comparing all these results with those of a control.")
     author = "Arturo Filastò"
-    version = "0.3.0"
+    version = "0.3.2"
 
     contentDecoders = [('gzip', GzipDecoder)]
 
@@ -136,6 +137,8 @@ class WebConnectivityTest(httpt.HTTPTest, dnst.DNSTest):
                 if (not i.startswith("http://";) and
                         not i.startswith("https://";)):
                     i = "http://{}/".format(i)
+                if i.startswith('https://') and self.localOptions['no-http'] != True:
+                    yield 'http'+i[5:]
                 yield i
         finally:
             fh.close()



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits