Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: https proxy
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 25-Jun-13 4:18am
GAJERA1.8K
Edited 25-Jun-13 21:05pm
v3

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Finally get the soluction ,Have to implement Remote Tunnel.
  Permalink  

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

  Print Answers RSS
0 Zoltán Zörgő 380
1 Sergey Alexandrovich Kryukov 185
2 OriginalGriff 150
3 Mika Wendelius 83
4 Peter Leow 80
0 Sergey Alexandrovich Kryukov 8,373
1 OriginalGriff 6,466
2 Peter Leow 3,567
3 Zoltán Zörgő 3,316
4 Richard MacCutchan 2,397


Advertise | Privacy | Mobile
Web03 | 2.8.150123.1 | Last Updated 10 Jul 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100