commit 17b0cf422adc81d356d1db4aba46b495e9487d0b
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Fri Jun 5 09:14:02 2020 +0200
Remove documentation for --traffic-model parameter.
---
onionperf/docs/onionperf.rst | 5 -----
1 file changed, 5 deletions(-)
diff --git a/onionperf/docs/onionperf.rst b/onionperf/docs/onionperf.rst
index 51e30a6..b16c79e 100644
--- a/onionperf/docs/onionperf.rst
+++ b/onionperf/docs/onionperf.rst
@@ -168,11 +168,6 @@ A oneshot measurement will …
[View More]run only until one successful download has completed.
The 'SOURCE' STRING to use in stats files produced by OnionPerf (default: hostname of the current machine)
::
---traffic-model PATH
-
-A file PATH to a TGen graphml XML traffic model, to use instead of the built-in Torperf traffic model (default: None)
-::
-
--prefix PATH
A directory PATH prefix where OnionPerf will run (default: current directory)
[View Less]
commit 2a506d6ab1c626d70f00d45fb310c0c59bca4907
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Tue May 26 23:05:02 2020 +0200
Make -o/-i arguments mutually exclusive.
Right now, it's possible to specify both -o and -i at the same time,
which doesn't make any sense.
Also, it's rather non-intuitive that both argument defaults are True
and that setting either of them changes their value to False.
This patch fixes both issues above.
…
[View More] Fixes #34316.
---
onionperf/onionperf | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/onionperf/onionperf b/onionperf/onionperf
index f430c3f..bc95e2b 100755
--- a/onionperf/onionperf
+++ b/onionperf/onionperf
@@ -194,15 +194,17 @@ def main():
action="store", dest="tgenconnectport",
default=8080)
- measure_parser.add_argument('-o', '--onion-only',
- help="""disable measuring download times over Tor back to {0}""".format(hostname),
- action="store_false", dest="do_inet",
- default=True)
+ onion_or_inet_only_group = measure_parser.add_mutually_exclusive_group()
- measure_parser.add_argument('-i', '--inet-only',
- help="""disable measuring download times over Tor to an ephemeral onion service""",
- action="store_false", dest="do_onion",
- default=True)
+ onion_or_inet_only_group.add_argument('-o', '--onion-only',
+ help="""only measure download times over Tor to an ephemeral onion service""",
+ action="store_true", dest="onion_only",
+ default=False)
+
+ onion_or_inet_only_group.add_argument('-i', '--inet-only',
+ help="""only measure download times over Tor exiting to a public webserver""",
+ action="store_true", dest="inet_only",
+ default=False)
measure_parser.add_argument('-n', '--nickname',
help="""the 'SOURCE' STRING to use in measurement result files produced by OnionPerf""",
@@ -352,7 +354,7 @@ def measure(args):
server_tor_socks_port = util.get_random_free_port()
meas = Measurement(args.torpath, args.tgenpath, args.prefix, args.private_prefix, args.nickname, args.oneshot, args.additional_client_conf, args.torclient_conf_file, args.torserver_conf_file)
- meas.run(do_onion=args.do_onion, do_inet=args.do_inet,
+ meas.run(do_onion=not args.inet_only, do_inet=not args.onion_only,
client_tgen_listen_port=client_tgen_port, client_tgen_connect_ip=client_connect_ip, client_tgen_connect_port=client_connect_port, client_tor_ctl_port=client_tor_ctl_port, client_tor_socks_port=client_tor_socks_port,
server_tgen_listen_port=server_tgen_port, server_tor_ctl_port=server_tor_ctl_port, server_tor_socks_port=server_tor_socks_port)
else:
[View Less]