Allow server to bind an OS-selected UDP port with -p 0.

It looks like Mosh used to be able to do this but the capability was
lost when port ranges were added in 141ec23.
This commit is contained in:
John Hood
2016-05-27 17:43:11 -04:00
parent c599987ff8
commit 8945efeb82
4 changed files with 21 additions and 9 deletions
+2 -1
View File
@@ -70,7 +70,8 @@ IP address of the local interface to bind (for multihomed hosts)
.TP
.B \-p \fIPORT\fP[:\fIPORT2\fP]
UDP port number or port-range to bind
UDP port number or port-range to bind. \fB\-p 0\fP will let the
operating system pick an available UDP port.
.TP
.B \-c \fICOLORS\fP
+4 -1
View File
@@ -183,9 +183,12 @@ Synonym for \-\-family=inet6
Use a particular server-side UDP port or port range,
for example, if this is the
only port that is forwarded through a firewall to the
server. Otherwise, \fBmosh\fP will choose a port between 60000 and
server. With \fB\-p 0\fP, the server will let the operating system pick an
available UDP port. Otherwise, \fBmosh\fP will choose a port between 60000 and
61000.
.TP
.B \-\-bind\-server={ssh|any|\fIIP\fP}
Control the IP address that the \fBmosh-server\fP binds to.