commit 3553559838459b27c437a9990a7dbf853b228ae2 Author: Damian Johnson atagar@torproject.org Date: Sat Dec 21 17:33:50 2013 -0800
Removing blind mode
Blind mode is mostly a legacy of arguments around 'is connecion data eavesdroppign or not?'. This argument was largely resolved my making arm smarter about what constitutes a client or exit connection, and scrubbing those.
Dropping the '--blind' argument. There could be good reasons to support removal of connection lookups (for instance, to reduce system load) but it shouldn't be this kind of first class argument. --- arm/arguments.py | 4 ---- arm/controller.py | 2 +- arm/resources/arm.1 | 5 ----- arm/settings.cfg | 3 +-- arm/starter.py | 3 --- test/arguments.py | 6 ++---- 6 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/arm/arguments.py b/arm/arguments.py index c7eeb08..26d0b01 100644 --- a/arm/arguments.py +++ b/arm/arguments.py @@ -22,7 +22,6 @@ DEFAULT_ARGS = { 'user_provided_socket': False, 'config': os.path.expanduser("~/.arm/armrc"), 'debug_path': None, - 'blind': False, 'logged_events': 'N3', 'print_version': False, 'print_help': False, @@ -35,7 +34,6 @@ OPT_EXPANDED = [ "socket=", "config=", "debug=", - "blind", "event=", "version", "help", @@ -82,8 +80,6 @@ def parse(argv): args['config'] = arg elif opt in ("-d", "--debug"): args['debug_path'] = os.path.expanduser(arg) - elif opt in ("-b", "--blind"): - args['blind'] = True elif opt in ("-e", "--event"): args['logged_events'] = arg elif opt in ("-v", "--version"): diff --git a/arm/controller.py b/arm/controller.py index 9cef92e..caccfaf 100644 --- a/arm/controller.py +++ b/arm/controller.py @@ -171,7 +171,7 @@ def initController(stdscr, startTime): try: initialStats = GRAPH_INIT_STATS.get(CONFIG["features.graph.type"]) graphPanel.setStats(initialStats) - except ValueError: pass # invalid stats, maybe connections when in blind mode + except ValueError: pass # invalid stats, maybe connections when lookups are disabled
# prepopulates bandwidth values from state file if CONFIG["features.graph.bw.prepopulate"] and torTools.getConn().isAlive(): diff --git a/arm/resources/arm.1 b/arm/resources/arm.1 index 3b8cfd4..68159cc 100644 --- a/arm/resources/arm.1 +++ b/arm/resources/arm.1 @@ -34,11 +34,6 @@ user provided configuration file (default is \fB~/.arm/armrc\fR) writes all arm logs to ~/.arm/log
.TP -\fB-b\fR, \fB--blind\fR -disable connection lookups (netstat, lsof, and ss), dropping the parts of the -interface that rely on this information - -.TP \fB-e\fR, \fB--event EVENT_FLAGS\fR flags for tor, arm, and torctl events to be logged (default is \fBN3\fR)
diff --git a/arm/settings.cfg b/arm/settings.cfg index 19f7cc8..198a6b5 100644 --- a/arm/settings.cfg +++ b/arm/settings.cfg @@ -10,14 +10,13 @@ msg.help | -c, --config CONFIG_PATH loaded configuration options, CONFIG_PATH | defaults to: {config} | -d, --debug LOG_PATH writes all arm logs to the given location -| -b, --blind disable connection lookups | -e, --event EVENT_FLAGS event types in message log (default: {events}) |{event_flags} | -v, --version provides version information | -h, --help presents this help | |Example: -|arm -b -i 1643 hide connection data, attaching to control port 1643 +|arm -i 1643 attach to control port 1643 |arm -e we -c /tmp/cfg use this configuration file with 'WARN'/'ERR' events
msg.debug_header diff --git a/arm/starter.py b/arm/starter.py index 1e6fe10..779421a 100644 --- a/arm/starter.py +++ b/arm/starter.py @@ -256,9 +256,6 @@ def main(): else: stem.util.log.notice(CONFIG['msg.config_not_found'].format(path = args.config))
- if args.blind: - config.set('features.panels.show.connection', 'false') - config.set("startup.events", args.logged_events)
# validates and expands log event flags diff --git a/test/arguments.py b/test/arguments.py index 0e7864f..a8fae78 100644 --- a/test/arguments.py +++ b/test/arguments.py @@ -24,9 +24,8 @@ class TestArgumentParsing(unittest.TestCase): self.assertEqual('/tmp/my_socket', args.control_socket) self.assertEqual('/tmp/my_config', args.config)
- args = parse(['--debug', '/tmp/dump', '--blind']) + args = parse(['--debug', '/tmp/dump']) self.assertEqual('/tmp/dump', args.debug_path) - self.assertEqual(True, args.blind)
args = parse(['--event', 'D1']) self.assertEqual('D1', args.logged_events) @@ -38,8 +37,7 @@ class TestArgumentParsing(unittest.TestCase): self.assertEqual(True, args.print_help)
def test_examples(self): - args = parse(['-b', '-i', '1643']) - self.assertEqual(True, args.blind) + args = parse(['-i', '1643']) self.assertEqual(1643, args.control_port)
args = parse(['-e', 'we', '-c', '/tmp/cfg'])
tor-commits@lists.torproject.org