mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
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.
This commit is contained in:
parent
d47be8d91a
commit
e65e5d165f
@ -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 */
|
||||
}
|
||||
|
||||
|
@ -1000,3 +1000,13 @@ different logging modes, all available from the GUI too:
|
||||
\b \c{-sshrawlog} selects \q{SSH packets and raw data} logging mode.
|
||||
|
||||
For more information on logging configuration, see \k{config-logging}.
|
||||
|
||||
\S2{using-cmdline-proxycmd} \i\c{-proxycmd}: specify a local proxy
|
||||
command
|
||||
|
||||
This option enables PuTTY's mode for running a \I{Local proxy}command
|
||||
on the local machine and using it as a proxy for the network
|
||||
connection. It expects a shell command string as an argument.
|
||||
|
||||
See \k{config-proxy-type} for more information on this, and on other
|
||||
proxy settings.
|
||||
|
Loading…
Reference in New Issue
Block a user