diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-03-08 23:31:38 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-03-08 23:31:38 +0100 |
commit | 41b02378342322aa8e264260057502f4d7493239 (patch) | |
tree | 2c36f9555820464145d4153d00f24834c6df62e4 /lib/ssh.c | |
parent | cabd010dd46ae4d37d91e20e1127cb00e67ec0a7 (diff) |
CONNECT: made generically not per-protocol
Curl_protocol_connect() now does the tunneling through the HTTP proxy if
requested instead of letting each protocol specific connection function
do it.
Diffstat (limited to 'lib/ssh.c')
-rw-r--r-- | lib/ssh.c | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -90,7 +90,6 @@ #include "multiif.h" #include "select.h" #include "warnless.h" -#include "http_proxy.h" #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> @@ -2660,33 +2659,6 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done) sessionhandle, deal with it */ Curl_reset_reqproto(conn); - if(conn->bits.tunnel_proxy && conn->bits.httpproxy) { - /* for SSH over HTTP proxy */ - struct HTTP http_proxy; - struct SSHPROTO *ssh_save; - - /* BLOCKING */ - /* We want "seamless" SSH operations through HTTP proxy tunnel */ - - /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member - * conn->proto.http; we want SSH through HTTP and we have to change the - * member temporarily for connecting to the HTTP proxy. After - * Curl_proxyCONNECT we have to set back the member to the original struct - * SSH pointer - */ - ssh_save = data->state.proto.ssh; - memset(&http_proxy, 0, sizeof(http_proxy)); - data->state.proto.http = &http_proxy; - - result = Curl_proxyCONNECT(conn, FIRSTSOCKET, - conn->host.name, conn->remote_port); - - data->state.proto.ssh = ssh_save; - - if(CURLE_OK != result) - return result; - } - result = ssh_init(conn); if(result) return result; |