[tor-commits] [bridgedb/main] Use the country block information provided by rdsys

meskio at torproject.org meskio at torproject.org
Wed Jan 26 17:13:09 UTC 2022


commit b0bdfc8ee3d8472f46c537464ed3f929ff3bbf97
Author: meskio <meskio at torproject.org>
Date:   Tue Jan 25 11:34:59 2022 +0100

    Use the country block information provided by rdsys
    
    rdsys does provide the list of countries where the bridge should not be
    distributed in the 'blocked_in' field.
    
    Closes: #40036
---
 bridgedb/bridges.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bridgedb/bridges.py b/bridgedb/bridges.py
index de9eefe..6cd3057 100644
--- a/bridgedb/bridges.py
+++ b/bridgedb/bridges.py
@@ -1580,6 +1580,9 @@ class Bridge(BridgeBackwardsCompatibility):
                     )
             self.transports = [transport]
 
+        for country in resource["blocked_in"]:
+            self.setBlockedIn(country)
+
     def updateFromNetworkStatus(self, descriptor, ignoreNetworkstatus=False):
         """Update this bridge's attributes from a parsed networkstatus
         document.



More information about the tor-commits mailing list