Click here to Skip to main content
15,887,301 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All ,

I have to make tunnel throug the proxy server.I have try on link https://login.yahoo.com/config/login_verify2?.intl=in&.src=ym.

I have succusfully authentic with certificate and get the response from it with underline.

Now ,Make this response as request and write it again to SSLStream .Wait for the response .

but i am not able to get the response over here ,Does any one know how to resolve this issue,

I have checked with fiddler and here same process are followed.The socket has been hang on Bold line.

 if (uri.Scheme == "https" || line.Contains("CONNECT"))
                {
                    rport = 443;
                   IPHostEntry rh = Dns.GetHostEntry("login.yahoo.com");
                                          
                    SslStream sslStream = sslTunnel(ns, uri.OriginalString);                  
                    data = ReadMessage(sslStream);                

GET /config/login_verify2?.intl=in&.src=ym HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-IN
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
Accept-Encoding: gzip, deflate
Host: login.yahoo.com
DNT: 1
Connection: Keep-Alive
Cookie: B=fr3ksjp8s5l0e&b=3&s=cd; MSC=t=1372134921X; _em_vt=8b5db33d77960d33c4f7f5e5a2ab51c7e944cd37e9-8521498151c81563; AO=o=1&s=1&dnt=1
                    
                    Socket remoteserver = new Socket(rh.AddressList[0].AddressFamily, SocketType.Stream, ProtocolType.IP);
                    remoteserver.Connect(new IPEndPoint(rh.AddressList[0], rport));        
                                      
                    byte[] databytes = Encoding.UTF8.GetBytes(data);
                    sslStream.Write(databytes, 0, databytes.Length);

 rec = sslStream.Read(buffer, 0, buffer.Length);

}
Posted
Updated 25-Jun-13 20:05pm
v3

1 solution

Finally get the soluction ,Have to implement Remote Tunnel.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900