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.
This commit is contained in:
Nathan Aclander 2016-01-10 16:28:22 -08:00 committed by Brian May
parent 45f572f7a8
commit 629c386dc5

View File

@ -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()