Browse Source

Start on the client code; does nothing yet

Ian Goldberg 5 years ago
parent
commit
e0170e762d
1 changed files with 20 additions and 0 deletions
  1. 20 0
      client.py

+ 20 - 0
client.py

@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import network
+import dirauth
+import relay
+
+class Client:
+    """A class representing a Tor client."""
+
+    def __init__(self):
+        self.consensus = None
+
+        # Get a network address for client-side use only (do not bind it
+        # to the network)
+        self.myaddr = network.NetAddr()
+        self.guardaddr = None
+
+    def initial_bootstrap(self):
+        """This method will use the network's fallback relays to enable
+        this client to choose a guard."""