From a69db5b683d5bc31cf3541de990838fefc8f9f5a Mon Sep 17 00:00:00 2001 From: Chad Brubaker Date: Wed, 25 Mar 2015 14:48:17 -0700 Subject: [PATCH] Add --no-routing argument --no-routing will skip the routing setup for tproxy and redirect routing modes. This is for the case where you want to set up nogotofail traffic routing in a non-standard mode with your own routing rules. It is up to the user to properly route traffic to the socket listening on --port. --- nogotofail/mitm/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nogotofail/mitm/__main__.py b/nogotofail/mitm/__main__.py index 986a66d0..b2e647d3 100644 --- a/nogotofail/mitm/__main__.py +++ b/nogotofail/mitm/__main__.py @@ -235,6 +235,9 @@ def parse_args(): parser.add_argument( "--mode", help="Traffic capture mode. Options are " + ", ".join(modes.keys()), choices=modes, metavar="MODE", action="store", default=default_mode) + parser.add_argument( + "--no-routing", help="Do not create routing rules in modes that require them.", + action="store_true", default=False) parser.set_defaults(**config) return parser.parse_args(argv) @@ -301,7 +304,7 @@ def run(): try: signal.signal(signal.SIGTERM, sigterm_handler) mode = modes[args.mode] - if mode.setup: + if mode.setup and not args.no_routing: mode.setup(args) blame = ( build_blame(