mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 18:56:28 +00:00
A bit closer to doing what it's supposed to.
This commit is contained in:
parent
92c30f5a12
commit
ce3785fc16
@ -24,7 +24,7 @@ from twisted.internet.error import ProcessExitedAlready, ProcessTerminated
|
|||||||
from allmydata.test.common import (
|
from allmydata.test.common import (
|
||||||
write_introducer,
|
write_introducer,
|
||||||
)
|
)
|
||||||
from allmydata.node import read_config
|
from allmydata.client import read_config
|
||||||
|
|
||||||
|
|
||||||
if which("docker") is None:
|
if which("docker") is None:
|
||||||
@ -196,7 +196,11 @@ async def _create_anonymous_node(reactor, name, control_port, request, temp_dir,
|
|||||||
'--nickname', name,
|
'--nickname', name,
|
||||||
'--introducer', introducer_furl,
|
'--introducer', introducer_furl,
|
||||||
'--hide-ip',
|
'--hide-ip',
|
||||||
'--listen', 'i2p',
|
'--listen=i2p',
|
||||||
|
'--shares-needed', '1',
|
||||||
|
'--shares-happy', '1',
|
||||||
|
'--shares-total', '2',
|
||||||
|
"--webport=" + web_port,
|
||||||
node_dir.path,
|
node_dir.path,
|
||||||
),
|
),
|
||||||
env=environ,
|
env=environ,
|
||||||
@ -206,31 +210,11 @@ async def _create_anonymous_node(reactor, name, control_port, request, temp_dir,
|
|||||||
|
|
||||||
# Which services should this client connect to?
|
# Which services should this client connect to?
|
||||||
write_introducer(node_dir, "default", introducer_furl)
|
write_introducer(node_dir, "default", introducer_furl)
|
||||||
with node_dir.child('tahoe.cfg').open('w') as f:
|
|
||||||
node_config = '''
|
|
||||||
[node]
|
|
||||||
nickname = %(name)s
|
|
||||||
web.port = %(web_port)s
|
|
||||||
web.static = public_html
|
|
||||||
log_gatherer.furl = %(log_furl)s
|
|
||||||
|
|
||||||
[i2p]
|
config = read_config(node_dir.path, "tub.port")
|
||||||
enabled = true
|
config.set_config("node", "log_gatherer.furl", flog_gatherer)
|
||||||
|
|
||||||
[client]
|
print("running...")
|
||||||
shares.needed = 1
|
|
||||||
shares.happy = 1
|
|
||||||
shares.total = 2
|
|
||||||
|
|
||||||
''' % {
|
|
||||||
'name': name,
|
|
||||||
'web_port': web_port,
|
|
||||||
'log_furl': flog_gatherer,
|
|
||||||
}
|
|
||||||
node_config = node_config.encode("utf-8")
|
|
||||||
f.write(node_config)
|
|
||||||
|
|
||||||
print("running")
|
|
||||||
node = await util._run_node(reactor, node_dir.path, request, None)
|
node = await util._run_node(reactor, node_dir.path, request, None)
|
||||||
print("okay, launched")
|
print("okay, launched")
|
||||||
return node
|
return node
|
||||||
|
Loading…
Reference in New Issue
Block a user