Tor.Net Example WebProxy?

Guys can anyone worked with the library
www.codeproject.com/Articles/1072864/Tor-NET-A-man...

Here is my not working code tell me what I'm not doing it right ?
Process[] previous = Process.GetProcessesByName("tor");
 if (previous != null && previous.Length > 0)
{
 foreach (Process process in previous)
process.Kill();
}

 ClientCreateParams createParameters = new ClientCreateParams();
 createParameters.ConfigurationFile = @"TorBrowser\Data\Tor\torrc";
 createParameters.ControlPassword = "";
 createParameters.ControlPort = 9051;
 createParameters.DefaultConfigurationFile = "";
 createParameters.Path = @"TorBrowser\Tor\tor.exe";

 createParameters.SetConfig(ConfigurationNames.AvoidDiskWrites, true);
 createParameters.SetConfig(ConfigurationNames.GeoIPFile, Path.Combine(Environment.CurrentDirectory, @"TorBrowser\Data\Tor\geoip"));
 createParameters.SetConfig(ConfigurationNames.GeoIPv6File, Path.Combine(Environment.CurrentDirectory, @"TorBrowser\Data\Tor\geoip6"));

 client = Client.Create(createParameters);


 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("https://api.ipify.org/?format=json");

 if (client.Proxy.IsRunning)
 request.Proxy = client.Proxy.WebProxy;

 using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{

 // Get the stream associated with the response.
 System.IO.Stream receiveStream = response.GetResponseStream();
 // Pipes the stream to a higher level stream reader with the required encoding format. 
 StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
 var html = readStream.ReadToEnd();
 var h = html;
 }
July 4th 19 at 23:36
0 answer

Find more questions by tags C#ProxyTor