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

[tor-commits] [bridgedb/master] Add IGNORE_NETWORKSTATUS config option.



commit bb3a3db7d8b2126bc5543286252e5fbafe750c16
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Thu Apr 30 06:02:43 2015 +0000

    Add IGNORE_NETWORKSTATUS config option.
---
 bridgedb.conf             |   20 +++++++++++++++++++-
 lib/bridgedb/configure.py |    4 ++++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/bridgedb.conf b/bridgedb.conf
index cbdead0..51d9047 100644
--- a/bridgedb.conf
+++ b/bridgedb.conf
@@ -20,10 +20,14 @@
 #
 # CHANGELOG:
 # ~~~~~~~~~~
-# Changed in version 0.3.2 - 2015-03-30
+# Changed in version 0.3.2 - 2015-04-30
 #   * CHANGE to using BridgeDB release versions for bridgedb.conf file versions.
 #   * ADD support for specifying bridge rotation periods via the
 #     EMAIL_ROTATION_PERIOD and HTTPS_ROTATION_PERIOD settings.
+#   * ADD a new option, IGNORE_NETWORKSTATUS, which controls if BridgeDB cares
+#     whether or not a bridge was present in the BridgeAuthority's
+#     networkstatus-bridges file, as well as what information is gleaned from
+#     the bridge-networkstatus documents within that file.
 #
 # Changed in version 0.0.15 - 2015-03-26
 #   * ADD new SUPPORTED_TRANSPORTS and DEFAULT_TRANSPORT settings.
@@ -123,6 +127,20 @@ EXTRA_INFO_FILES = ["cached-extrainfo", "cached-extrainfo.new"]
 # learning which current bridges are Running, as well as their IPv6 addresses.
 STATUS_FILE = "networkstatus-bridges"
 
+# If ``True``, then the only information which we obtain from the
+# networkstatus file (the ``STATUS_FILE`` option) created by the
+# BridgeAuthority are the bridge flags (i.e. "Running", "Stable", etc.), and
+# we ignore all errors which have anything to do with networkstatus being
+# wrong, out-of-date, or missing.
+#
+# Otherwise, if ``True``, use the networkstatus to determine which bridges
+# should be distributed.
+#
+# See https://bugs.torproject.org/9380#comment:39,
+# https://bugs.torproject.org/11216, and https://bugs.torproject.org/15866.
+#
+IGNORE_NETWORKSTATUS = True
+
 # Certificate file and private key for the HTTPS Distributor. To create a
 # self-signed cert, run ``scripts/make-ssl-cert`` it will create these files
 # in your current directory.
diff --git a/lib/bridgedb/configure.py b/lib/bridgedb/configure.py
index 2992e1c..0056107 100644
--- a/lib/bridgedb/configure.py
+++ b/lib/bridgedb/configure.py
@@ -120,6 +120,10 @@ def loadConfig(configFile=None, configCls=None):
         setting = getattr(config, attr, None) # Default to None
         setattr(config, attr, setting)
 
+    for attr in ["IGNORE_NETWORKSTATUS"]:
+        setting = getattr(config, attr, True) # Default to True
+        setattr(config, attr, setting)
+
     for attr in ["FORCE_PORTS", "FORCE_FLAGS", "NO_DISTRIBUTION_COUNTRIES"]:
         setting = getattr(config, attr, []) # Default to empty lists
         setattr(config, attr, setting)



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