diff options
-rw-r--r-- | lib/chutney/TorNet.py | 11 | ||||
-rw-r--r-- | networks/bridges+ipv6 | 15 | ||||
-rw-r--r-- | torrc_templates/bridge-v6.tmpl | 3 |
3 files changed, 27 insertions, 2 deletions
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', diff --git a/networks/bridges+ipv6 b/networks/bridges+ipv6 new file mode 100644 index 0000000..00e6029 --- /dev/null +++ b/networks/bridges+ipv6 @@ -0,0 +1,15 @@ +Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl") +Relay = Node(tag="r", relay=1, torrc="relay.tmpl") +Client = Node(tag="c", torrc="client.tmpl") + +BridgeAuthority = Node(tag="ba", authority=1, bridgeauthority=1, + relay=1, torrc="bridgeauthority.tmpl") +Bridge = Node(tag="br", bridge=1, relay=1, torrc="bridge.tmpl") +BridgeIPv6 = Node(tag="br", bridge=1, relay=1, ipv6_addr="[::1]", torrc="bridge-v6.tmpl") +BridgeClient = Node(tag="bc", torrc="bridgeclient.tmpl") + +NODES = Authority.getN(3) + BridgeAuthority.getN(1) + Relay.getN(5) + \ + Bridge.getN(1) + BridgeIPv6.getN(1) + \ + Client.getN(2) + BridgeClient.getN(1) + +ConfigureNodes(NODES) diff --git a/torrc_templates/bridge-v6.tmpl b/torrc_templates/bridge-v6.tmpl new file mode 100644 index 0000000..c9ba1e3 --- /dev/null +++ b/torrc_templates/bridge-v6.tmpl @@ -0,0 +1,3 @@ +${include:bridge.tmpl} +OrPort ${ipv6_addr}:${orport} IPv6Only + |