From 81ef0b9345dd393fea8edab879ee1fd8f0bf9e81 Mon Sep 17 00:00:00 2001 From: runge Date: Sat, 27 Oct 2007 22:45:30 +0000 Subject: x11vnc: -proxy, -ssh options. ncache bug in -8to24, Selection "targets" bugfix. --- x11vnc/remote.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'x11vnc/remote.c') diff --git a/x11vnc/remote.c b/x11vnc/remote.c index e35cef9..e607707 100644 --- a/x11vnc/remote.c +++ b/x11vnc/remote.c @@ -1380,6 +1380,25 @@ char *process_remote_cmd(char *cmd, int stringonly) { /* this is a reverse connection */ reverse_connect(p); + } else if (strstr(p, "proxy") == p) { + COLON_CHECK("proxy:") + if (query) { + snprintf(buf, bufn, "ans=%s%s%s", p, co, + NONUL(connect_proxy)); + goto qry; + } + p += strlen("proxy:"); + if (connect_proxy) { + free(connect_proxy); + connect_proxy = NULL; + } + if (!strcmp(p, "") || !strcasecmp(p, "none")) { + rfbLog("remote_cmd: disabled -proxy\n"); + } else { + connect_proxy = strdup(p); + rfbLog("remote_cmd: set -proxy %s\n", connect_proxy); + } + } else if (strstr(p, "allowonce") == p) { COLON_CHECK("allowonce:") if (query) { @@ -2910,6 +2929,18 @@ char *process_remote_cmd(char *cmd, int stringonly) { ncache_old_wm = 0; rfbLog("remote_cmd: disabled -ncache_old_wm\n"); + } else if (strstr(p, "ncache_pad") == p) { + int orig = ncache_pad, n; + COLON_CHECK("ncache_pad:") + if (query) { + snprintf(buf, bufn, "ans=%s%s%d", p, co, ncache_pad); + goto qry; + } + p += strlen("ncache_pad:"); + n = atoi(p); + + rfbLog("remote_cmd: setting ncache_pad %d to: %d\n", orig, n); + } else if (!strcmp(p, "ncache")) { if (query) { snprintf(buf, bufn, "ans=%s:%d", p, !!ncache); -- cgit v1.2.3