Commit f6e300c8 authored by juga's avatar juga
Browse files

chg: config: Add option to connect to external tor

via control port.
parent 713d4004
...@@ -93,6 +93,10 @@ tor ...@@ -93,6 +93,10 @@ tor
sbws's owned tor pid file. (Default: ~/.sbws/tor/sbws/tor.pid) sbws's owned tor pid file. (Default: ~/.sbws/tor/sbws/tor.pid)
log = STR log = STR
sbws's owned tor directory log files. (Default: ~/.sbws/tor/log) sbws's owned tor directory log files. (Default: ~/.sbws/tor/log)
external_control_port = INT
tor control port to connect to. Useful to run integration tests with
chutney.
(Default: not set. If set, it takes preference over the control socket)
extra_lines = extra_lines =
sbws's tor extra configuration. (Default: None) sbws's tor extra configuration. (Default: None)
......
...@@ -66,6 +66,7 @@ control_socket = ${tor:run_dpath}/control ...@@ -66,6 +66,7 @@ control_socket = ${tor:run_dpath}/control
pid = ${tor:run_dpath}/tor.pid pid = ${tor:run_dpath}/tor.pid
# note this is a directory # note this is a directory
log = ${tor:datadir}/log log = ${tor:datadir}/log
external_control_port =
extra_lines = extra_lines =
[cleanup] [cleanup]
......
...@@ -323,7 +323,9 @@ def _validate_tor(conf): ...@@ -323,7 +323,9 @@ def _validate_tor(conf):
sec = 'tor' sec = 'tor'
err_tmpl = Template('$sec/$key ($val): $e') err_tmpl = Template('$sec/$key ($val): $e')
unvalidated_keys = [ unvalidated_keys = [
'datadir', 'run_dpath', 'control_socket', 'pid', 'log', 'extra_lines'] 'datadir', 'run_dpath', 'control_socket', 'pid', 'log',
'external_control_port', 'extra_lines',
]
all_valid_keys = unvalidated_keys all_valid_keys = unvalidated_keys
errors.extend(_validate_section_keys(conf, sec, all_valid_keys, err_tmpl)) errors.extend(_validate_section_keys(conf, sec, all_valid_keys, err_tmpl))
return errors return errors
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment