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

[tor-commits] [sbws/master] relaylist: add method to get exits with some flags



commit 2e100e818da0ad50bb9ddb4bb72ae4968f286166
Author: juga0 <juga@xxxxxxxxxx>
Date:   Thu Nov 22 14:23:15 2018 +0000

    relaylist: add method to get exits with some flags
    
    The flags are: not have the badflag and the policy allows to exit
    to a port.
---
 sbws/lib/relaylist.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sbws/lib/relaylist.py b/sbws/lib/relaylist.py
index 979ae7f..28802a1 100644
--- a/sbws/lib/relaylist.py
+++ b/sbws/lib/relaylist.py
@@ -230,3 +230,8 @@ class RelayList:
     def _refresh(self):
         self._relays = self._init_relays()
         self._last_refresh = time.time()
+
+
+    def exits_not_bad_allowing_port(self, port):
+        return [r for r in self.exits
+                if r.is_exit_not_bad_allowing_port(port)]



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