Ticket #1007: trac_tahoe_http_proxy.txt

File trac_tahoe_http_proxy.txt, 1.2 KB (added by duck, at 2010-03-27T21:06:05Z)

HTTP Proxy support to Foolscap

Line 
1diff --git src/allmydata/node.py src/allmydata/node.py
2index b68ee2f..45403c5 100644
3--- src/allmydata/node.py
4+++ src/allmydata/node.py
5@@ -153,6 +153,10 @@ class Node(service.MultiService):
6             # N.B.: this is in seconds, so use "1800" to get 30min
7             self.tub.setOption("disconnectTimeout", int(disconnect_timeout_s))
8 
9+        http_proxy = self.get_config("node", "http_proxy", "")
10+        if http_proxy:
11+            self.tub.setOption("httpProxy", http_proxy)
12+
13         self.nodeid = b32decode(self.tub.tubID.upper()) # binary format
14         self.write_config("my_nodeid", b32encode(self.nodeid).lower() + "\n")
15         self.short_nodeid = b32encode(self.nodeid).lower()[:8] # ready for printing
16diff --git src/allmydata/scripts/create_node.py src/allmydata/scripts/create_node.py
17index 4e23ac0..b2b0d3e 100644
18--- src/allmydata/scripts/create_node.py
19+++ src/allmydata/scripts/create_node.py
20@@ -73,6 +73,7 @@ def write_node_config(c, config):
21         webport = ""
22     c.write("web.port = %s\n" % webport)
23     c.write("web.static = public_html\n")
24+    c.write("#http_proxy =\n")
25     c.write("#tub.port =\n")
26     c.write("#tub.location = \n")
27     c.write("#log_gatherer.furl =\n")