w.dilate(): accept transit_relay_location=, pass through to manager

This commit is contained in:
Brian Warner 2019-08-11 19:37:10 -07:00
parent 1219fd08ca
commit 840dfa603b
2 changed files with 4 additions and 4 deletions

View File

@ -205,8 +205,8 @@ class Boss(object):
self._did_start_code = True
self._C.set_code(code)
def dilate(self, no_listen=False):
return self._D.dilate(no_listen=no_listen) # fires with endpoints
def dilate(self, transit_relay_location=None, no_listen=False):
return self._D.dilate(transit_relay_location, no_listen=no_listen) # fires with endpoints
@m.input()
def send(self, plaintext):

View File

@ -193,10 +193,10 @@ class _DeferredWormhole(object):
raise NoKeyError()
return derive_key(self._key, to_bytes(purpose), length)
def dilate(self, no_listen=False):
def dilate(self, transit_relay_location=None, no_listen=False):
if not self._enable_dilate:
raise NotImplementedError
return self._boss.dilate(no_listen) # fires with (endpoints)
return self._boss.dilate(transit_relay_location, no_listen) # fires with (endpoints)
def close(self):
# fails with WormholeError unless we established a connection