Browse Source

Merge branch 'x0-interface-option' of https://github.com/sotho/tigervnc

tags/v1.11.90
Pierre Ossman 2 years ago
parent
commit
5de7a9a8f0
2 changed files with 14 additions and 2 deletions
  1. 10
    2
      unix/x0vncserver/x0vncserver.cxx
  2. 4
    0
      unix/x0vncserver/x0vncserver.man

+ 10
- 2
unix/x0vncserver/x0vncserver.cxx View File

@@ -68,6 +68,9 @@ StringParameter hostsFile("HostsFile", "File with IP access control rules", "");
BoolParameter localhostOnly("localhost",
"Only allow connections from localhost",
false);
StringParameter interface("interface",
"listen on the specified network address",
"all");

static const char* defaultDesktopName()
{
@@ -300,11 +303,16 @@ int main(int argc, char** argv)
}

if ((int)rfbport != -1) {
const char *addr = interface;
if (strcasecmp(addr, "all") == 0)
addr = 0;
if (localhostOnly)
createLocalTcpListeners(&listeners, (int)rfbport);
else
createTcpListeners(&listeners, 0, (int)rfbport);
vlog.info("Listening on port %d", (int)rfbport);
createTcpListeners(&listeners, addr, (int)rfbport);
vlog.info("Listening for VNC connections on %s interface(s), port %d",
localhostOnly ? "local" : (const char*)interface,
(int)rfbport);
}

const char *hostsData = hostsFile.getData();

+ 4
- 0
unix/x0vncserver/x0vncserver.man View File

@@ -178,6 +178,10 @@ Only allow connections from the same machine. Useful if you use SSH and want to
stop non-SSH connections from any other hosts.
.
.TP
.B \-interface \fIIP address\fP
Listen on interface. By default x0vncserver listens on all available interfaces.
.
.TP
.B \-AlwaysShared
Always treat incoming connections as shared, regardless of the client-specified
setting. Default is off.

Loading…
Cancel
Save