|
@@ -136,10 +136,26 @@ class ClientChannelManager(relay.ChannelManager):
|
|
|
|
|
|
return circhandler
|
|
|
|
|
|
+ def new_circuit_telescoping(self):
|
|
|
+ """Create a new circuit from this client. (Telescoping Walking Onions
|
|
|
+ version)"""
|
|
|
+
|
|
|
+ # Get our channel to the guard- walking onions assumes the client can
|
|
|
+ # botostrap the first hop using out-of-channel mechanisms
|
|
|
+ print("GUARD ADDRESS " + self.guardaddr)
|
|
|
+ guardchannel = self.get_channel_to(self.guardaddr)
|
|
|
+
|
|
|
+ # Allocate a new circuit id on it
|
|
|
+ circid, circhandler = guardchannel.new_circuit()
|
|
|
+
|
|
|
def new_circuit(self):
|
|
|
"""Create a new circuit from this client."""
|
|
|
if network.thenetwork.womode == network.WOMode.VANILLA:
|
|
|
+ print("creating enw circuit of type " + network.WOMODE.VANILLA)
|
|
|
return self.new_circuit_vanilla()
|
|
|
+ elif network.thenetwork.womode == network.WOMode.TELESCOPING:
|
|
|
+ return self.new_circuit_telescoping()
|
|
|
+ #TODO create a new circuit for single-pass
|
|
|
|
|
|
def received_msg(self, msg, peeraddr, channel):
|
|
|
"""Callback when a NetMsg not specific to a circuit is
|