Hi,

I am developing an client application that need to talk with server using
proxy.

The client application is able to communicate with server when connected
directly with out proxy.

I need help on how to create client application that can communicate with
server thru proxy.

I read openssl mailing list and could figure out how to communicate with
proxy and could not connect with ssl server.
here is my pseudo code

conn_bio = BIO_new_connect("proxy addr and port);
BIO_do_connect(conn_bio);
// connection is succesful
BIO_puts("CONNECT sslserver.com:443 HTTP/1.1\r\nHOST: dvmsqa-dv.intusurg.com
\r\n\r\n")
for(;;)
{
        len = BIO_read(conn_bio, tmpbuff, 4096);
        if(len <= 0) break;
        ISI_PRINTF("%s",tmpbuff);
}

g_ssl_obj = SSL_new(g_ctx_obj); // I have already created ctx obj and that
worked fine with out proxy
// here I could get establish http connection with proxy server and it
returned HTTP 200 code.
SSL_set_bio(g_ssl_obj,conn_bio,conn_bio);

ret = SSL_connect(g_ssl_obj); // when this line is executed, It just keeps
waiting here.

once again, this code works fine when I dont use proxy server.

Could you please let me know what is that I  am missing in order to connect
to proxy.

I looked in to same other implementations , looks like the proxy is
expecting server host name and port id as part of "client hello"

I am not sure how to send server host name and port id during ssl_connect.

T

Reply via email to