From 36cbc892d4a22a6284d4d1776824cedad89a555b Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 18 Jul 2012 22:06:11 +0200 Subject: Add support for bridges on IPv6 and clients using them. No IPv6-only support atm. --- lib/chutney/TorNet.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py index a4105fb..78728ed 100644 --- a/lib/chutney/TorNet.py +++ b/lib/chutney/TorNet.py @@ -179,7 +179,8 @@ class LocalNodeBuilder(NodeBuilder): # tor_gencert -- path to tor_gencert binary # tor -- path to tor binary # auth_cert_lifetime -- lifetime of authority certs, in months. - # ip -- IP to listen on (used only if authority) + # ip -- IP to listen on (used only if authority or bridge) + # ipv6_addr -- IPv6 address to listen on (used only if ipv6 bridge) # orport, dirport -- (used only if authority) # fingerprint -- used only if authority # dirserver_flags -- used only if authority @@ -343,7 +344,12 @@ class LocalNodeBuilder(NodeBuilder): if not self._env['bridge']: return "" - return "Bridge %s:%s\n" % (self._env['ip'], self._env['orport']) + bridgelines = "Bridge %s:%s\n" % (self._env['ip'], + self._env['orport']) + if self._env['ipv6_addr'] is not None: + bridgelines += "Bridge %s:%s\n" % (self._env['ipv6_addr'], + self._env['orport']) + return bridgelines class LocalNodeController(NodeController): def __init__(self, env): @@ -466,6 +472,7 @@ DEFAULTS = { 'tor' : 'tor', 'auth_cert_lifetime' : 12, 'ip' : '127.0.0.1', + 'ipv6_addr' : None, 'dirserver_flags' : 'no-v2', 'chutney_dir' : '.', 'torrc_fname' : '${dir}/torrc', -- cgit v1.2.3