diff options
author | Nathan Aclander <naclander@linux.ucla.edu> | 2016-01-10 16:28:22 -0800 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2016-01-12 13:07:07 +1100 |
commit | 629c386dc5e72eed9f442993d379263d68064547 (patch) | |
tree | bf64a71f4ebb98d6f1c302869bf86b37919524fd | |
parent | 45f572f7a8626424cc003c021495ed89c00c61db (diff) |
Add the option to disable sshuttle ipv6 support
Using --disable-ipv6 will now force sshuttle not to capture
ipv6 traffic, even if the client supports ipv6.
-rw-r--r-- | sshuttle/__main__.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sshuttle/__main__.py b/sshuttle/__main__.py index 7267ca7..f2cdc57 100644 --- a/sshuttle/__main__.py +++ b/sshuttle/__main__.py @@ -130,6 +130,7 @@ e,ssh-cmd= the command to use to connect to the remote [ssh] seed-hosts= with -H, use these hostnames for initial scan (comma-separated) no-latency-control sacrifice latency to improve bandwidth benchmarks wrap= restart counting channel numbers after this number (for testing) +disable-ipv6 disables ipv6 support D,daemon run in the background as a daemon s,subnets= file where the subnets are stored, instead of on the command line syslog send log messages to syslog (default if you use --daemon) @@ -186,10 +187,7 @@ try: method_name = opt.method else: o.fatal("method_name %s not supported" % opt.method) - if not opt.listen: - ipport_v6 = "auto" # parse_ipport6('[::1]:0') - ipport_v4 = "auto" # parse_ipport4('127.0.0.1:0') - else: + if opt.listen: ipport_v6 = None ipport_v4 = None list = opt.listen.split(",") @@ -198,6 +196,11 @@ try: ipport_v6 = parse_ipport6(ip) else: ipport_v4 = parse_ipport4(ip) + else: + # parse_ipport4('127.0.0.1:0') + ipport_v4 = "auto" + # parse_ipport6('[::1]:0') + ipport_v6 = "auto" if not opt.disable_ipv6 else None if opt.syslog: ssyslog.start_syslog() ssyslog.stderr_to_syslog() |