Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2016-05-03 16:31:10 +0300
committerSimon Tatham <anakin@pobox.com>2016-05-03 17:59:15 +0300
commite65e5d165fc2935fcc4bece20dddce485316042f (patch)
tree7f62aacd8262c5d21a368df9497f9f6568863644 /cmdline.c
parentd47be8d91a0395f521f91e653196d2ad64802a74 (diff)
Add a '-proxycmd' command-line option.
This is equivalent to selecting 'Local' as the proxy type and entering the argument string in the proxy command box, in the GUI. I've pulled this out of all the other proxy options to promote to a named command-line option, partly because it's the proxy option with the most natural command-line expression in the first place (any shell command you might want to use is already in the form of a single string), and also because it has uses beyond end-user proxying applications: in particular, replacing the network connection with a local process is a convenient way to do testing in the style of contrib/samplekex.py, avoiding the need to run a separate command to make the test 'server' listen on a port.
Diffstat (limited to 'cmdline.c')
-rw-r--r--cmdline.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmdline.c b/cmdline.c
index 92c87b3b..e6b69073 100644
--- a/cmdline.c
+++ b/cmdline.c
@@ -601,6 +601,14 @@ int cmdline_process_param(const char *p, char *value,
filename_free(fn);
}
+ if (!strcmp(p, "-proxycmd")) {
+ RETURN(2);
+ UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
+ SAVEABLE(0);
+ conf_set_int(conf, CONF_proxy_type, PROXY_CMD);
+ conf_set_str(conf, CONF_proxy_telnet_command, value);
+ }
+
return ret; /* unrecognised */
}