[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/maint-1.1] chg: config: Add option to connect to external tor
commit f6e300c83508508a6f38abe76390f9c6c3de00a2
Author: juga0 <juga@xxxxxxxxxx>
Date: Wed Dec 16 15:14:48 2020 +0000
chg: config: Add option to connect to external tor
via control port.
---
docs/source/man_sbws.ini.rst | 4 ++++
sbws/config.default.ini | 1 +
sbws/util/config.py | 4 +++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/docs/source/man_sbws.ini.rst b/docs/source/man_sbws.ini.rst
index f878ce8..e2127ab 100644
--- a/docs/source/man_sbws.ini.rst
+++ b/docs/source/man_sbws.ini.rst
@@ -93,6 +93,10 @@ tor
sbws's owned tor pid file. (Default: ~/.sbws/tor/sbws/tor.pid)
log = STR
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 =
sbws's tor extra configuration. (Default: None)
diff --git a/sbws/config.default.ini b/sbws/config.default.ini
index cb943d0..0105527 100644
--- a/sbws/config.default.ini
+++ b/sbws/config.default.ini
@@ -66,6 +66,7 @@ control_socket = ${tor:run_dpath}/control
pid = ${tor:run_dpath}/tor.pid
# note this is a directory
log = ${tor:datadir}/log
+external_control_port =
extra_lines =
[cleanup]
diff --git a/sbws/util/config.py b/sbws/util/config.py
index e1bc429..5ba3fd5 100644
--- a/sbws/util/config.py
+++ b/sbws/util/config.py
@@ -323,7 +323,9 @@ def _validate_tor(conf):
sec = 'tor'
err_tmpl = Template('$sec/$key ($val): $e')
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
errors.extend(_validate_section_keys(conf, sec, all_valid_keys, err_tmpl))
return errors
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits