From 48b7ef21a104e66035bd75566a8d96f0e07b4c14 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 21 Dec 2021 13:35:51 +0000 Subject: [PATCH] Pass an Interactor to platform_new_connection. This will mean that platform-specific proxy types will also be able to set themselves up as child Interactors and prompt the user interactively for passwords and the like. NFC: nothing uses the new parameter yet. --- network.h | 2 +- proxy/pproxy.c | 2 +- proxy/proxy.c | 2 +- unix/local-proxy.c | 2 +- windows/local-proxy.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/network.h b/network.h index d144d952..551d0be2 100644 --- a/network.h +++ b/network.h @@ -195,7 +195,7 @@ SockAddr *name_lookup(const char *host, int port, char **canonicalname, Socket *platform_new_connection(SockAddr *addr, const char *hostname, int port, bool privport, bool oobinline, bool nodelay, bool keepalive, - Plug *plug, Conf *conf); + Plug *plug, Conf *conf, Interactor *itr); /* callback for SSH jump-host proxying */ Socket *sshproxy_new_connection(SockAddr *addr, const char *hostname, diff --git a/proxy/pproxy.c b/proxy/pproxy.c index 4b08606e..1712ae8c 100644 --- a/proxy/pproxy.c +++ b/proxy/pproxy.c @@ -11,7 +11,7 @@ Socket *platform_new_connection(SockAddr *addr, const char *hostname, int port, int privport, int oobinline, int nodelay, int keepalive, - Plug *plug, Conf *conf) + Plug *plug, Conf *conf, Interactor *itr) { return NULL; } diff --git a/proxy/proxy.c b/proxy/proxy.c index 979f1468..b228bdb7 100644 --- a/proxy/proxy.c +++ b/proxy/proxy.c @@ -486,7 +486,7 @@ Socket *new_connection(SockAddr *addr, const char *hostname, if ((sret = platform_new_connection(addr, hostname, port, privport, oobinline, nodelay, keepalive, - plug, conf)) != NULL) + plug, conf, itr)) != NULL) return sret; ps = snew(ProxySocket); diff --git a/unix/local-proxy.c b/unix/local-proxy.c index f4c98ced..7275bd5a 100644 --- a/unix/local-proxy.c +++ b/unix/local-proxy.c @@ -17,7 +17,7 @@ Socket *platform_new_connection(SockAddr *addr, const char *hostname, int port, bool privport, bool oobinline, bool nodelay, bool keepalive, - Plug *plug, Conf *conf) + Plug *plug, Conf *conf, Interactor *itr) { char *cmd; diff --git a/windows/local-proxy.c b/windows/local-proxy.c index 19ceb726..7e4e7bed 100644 --- a/windows/local-proxy.c +++ b/windows/local-proxy.c @@ -15,7 +15,7 @@ Socket *platform_new_connection(SockAddr *addr, const char *hostname, int port, bool privport, bool oobinline, bool nodelay, bool keepalive, - Plug *plug, Conf *conf) + Plug *plug, Conf *conf, Interactor *itr) { char *cmd; HANDLE us_to_cmd, cmd_from_us;