aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nxcomp/Misc.cpp')
-rw-r--r--nxcomp/Misc.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/nxcomp/Misc.cpp b/nxcomp/Misc.cpp
index 2c72259e3..0095eaa74 100644
--- a/nxcomp/Misc.cpp
+++ b/nxcomp/Misc.cpp
@@ -15,11 +15,11 @@
/* */
/**************************************************************************/
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cctype>
+#include <cstdlib>
#include <unistd.h>
-#include <signal.h>
+#include <csignal>
#include <errno.h>
#include <string.h>
@@ -42,6 +42,14 @@
#undef DEBUG
//
+// By default nxproxy binds to all network interfaces, setting
+// DEFAULT_LOOPBACK_BIND to 1 enables binding to the loopback
+// device only.
+//
+
+const int DEFAULT_LOOPBACK_BIND = 0;
+
+//
// TCP port offset applied to any NX port specification.
//
@@ -137,6 +145,8 @@ static const char UsageInfo[] =
\n\
listen=n Local port used for accepting the proxy connection.\n\
\n\
+ loopback=b Bind to the loopback device only.\n\
+\n\
accept=s Name or IP of host that can connect to the proxy.\n\
\n\
connect=s Name or IP of host that the proxy will connect to.\n\