1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/proxy
Simon Tatham c1ddacf78f Rewrite local-proxy system to allow interactive prompts.
This fills in the remaining gap in the interactive prompt rework of
the proxy system in general. If you used the Telnet proxy with a
command containing %user or %pass, and hadn't filled in those
variables in the PuTTY config, then proxy/telnet.c would prompt you at
run time to enter the proxy auth details. But the local proxy command,
which uses the same format_telnet_command function, would not do that.
Now it does!

I've implemented this by moving the formatting of the proxy command
into a new module proxy/local.c, shared between both the Unix and
Windows local-proxy implementations. That module implements a
DeferredSocketOpener, which constructs the proxy command (prompting
first if necessary), and once it's constructed, hands it to a
per-platform function platform_setup_local_proxy().

So each platform-specific proxy function, instead of starting a
subprocess there and then and passing its details to make_fd_socket or
make_handle_socket, now returns a _deferred_ version of one of those
sockets, with the DeferredSocketOpener being the thing in
proxy/local.c. When that calls back to platform_setup_local_proxy(),
we actually start the subprocess and pass the resulting fds/handles to
the deferred socket to un-defer it.

A side effect of the rewrite is that when proxy commands are logged in
the Event Log, they now get the same amenities as in the Telnet proxy
type: the proxy password is sanitised out, and any difficult
characters are escaped.
2021-12-22 15:45:41 +00:00
..
cproxy.c Withdraw support for SHA-512-256 in HTTP Digest. 2021-11-27 11:41:00 +00:00
cproxy.h HTTP proxy: correctly handle multiple auth headers. 2021-12-21 09:36:25 +00:00
http.c HTTP proxy: correctly handle multiple auth headers. 2021-12-21 09:36:25 +00:00
interactor.c Fix Plink's handling of interactor_announce() blank lines. 2021-11-06 14:48:26 +00:00
local.c Rewrite local-proxy system to allow interactive prompts. 2021-12-22 15:45:41 +00:00
nocproxy.c Withdraw support for SHA-512-256 in HTTP Digest. 2021-11-27 11:41:00 +00:00
noproxy.c Pass an Interactor to new_connection(). 2021-10-30 18:19:56 +01:00
nosshproxy.c Pass an Interactor to new_connection(). 2021-10-30 18:19:56 +01:00
pproxy.c Pass an Interactor to platform_new_connection. 2021-12-22 15:24:58 +00:00
proxy.c Pass an Interactor to platform_new_connection. 2021-12-22 15:24:58 +00:00
proxy.h Rewrite local-proxy system to allow interactive prompts. 2021-12-22 15:45:41 +00:00
socks4.c Reorganise proxy system into coroutines. 2021-11-19 15:09:17 +00:00
socks5.c Support interactive password prompts in SOCKS 5. 2021-11-19 15:40:10 +00:00
socks.h Pull out SOCKS protocol constants into a header. 2021-11-19 15:09:17 +00:00
sshproxy.c New Seat query, has_mixed_input_stream(). 2021-11-06 14:48:26 +00:00
telnet.c Remove duplicated string-literal formatter in Telnet proxy. 2021-12-22 15:05:04 +00:00