Ejemplo n.º 1
0
 public Sender(Receiver rec)
 {
     r = rec;
     Socks4aProxyClient proxy = new Socks4aProxyClient("127.0.0.1", 9050);
     clientConn = proxy.CreateConnection(MainClass.host, 6667);
     networkStream = clientConn.GetStream();
     writer = new StreamWriter(networkStream);
     reader = new StreamReader(networkStream);
     writer.AutoFlush = true;
 }
Ejemplo n.º 2
0
 public SSLSender(ReceiverSSL SSLrec)
 {
     r = SSLrec;
     //clientConn = new TcpClient(MainClass.host, 6697);
     Socks4aProxyClient proxy = new Socks4aProxyClient("127.0.0.1", 9050);
     clientConn = proxy.CreateConnection(MainClass.host, 6697);
     networkStream = clientConn.GetStream();
     sslCo = new SslStream(networkStream, false, new RemoteCertificateValidationCallback(trustCert));
     sslCo.AuthenticateAsClient(MainClass.host);
     writer = new StreamWriter(sslCo);
     reader = new StreamReader(sslCo);
     writer.AutoFlush = true;
 }