Skip to content

Fix doc about --listen option#500

Merged
brianmay merged 2 commits intosshuttle:masterfrom
shimobayashi:fix-doc-opt-listen
Aug 5, 2020
Merged

Fix doc about --listen option#500
brianmay merged 2 commits intosshuttle:masterfrom
shimobayashi:fix-doc-opt-listen

Conversation

@shimobayashi
Copy link
Contributor

@shimobayashi shimobayashi commented Aug 5, 2020

This PR provides correct document about --listen option probably.
(I don't know about tproxy and pf methods, so I'm not sure this change is right.)

Current document is this:

For the tproxy and pf methods this can be an IPv6 address. Use this option
twice if required, to provide both IPv4 and IPv6 addresses.
https://github.com/sshuttle/sshuttle/blob/5bdf36152ab9302eada49ead7a106d2dc666b9c5/docs/manpage.rst

But the code didn't seem to be doing that.

if opt.listen:
ipport_v6 = None
ipport_v4 = None
lst = opt.listen.split(",")
for ip in lst:
family, ip, port = parse_ipport(ip)
if family == socket.AF_INET6:
ipport_v6 = (ip, port)
else:
ipport_v4 = (ip, port)
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

@shimobayashi shimobayashi marked this pull request as ready for review August 5, 2020 07:13
@brianmay brianmay merged commit c0a8135 into sshuttle:master Aug 5, 2020
@brianmay
Copy link
Member

brianmay commented Aug 5, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants