Skip to content

Bug fixed (SocksPort) and add the DataDirectory command #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Bug fixed (SocksPort) and add the DataDirectory command #3

wants to merge 6 commits into from

Conversation

PsykotropyK
Copy link

Fixed a bug in ClientCreateParam.cs (SocksPort hardcodded which prevented the user to specify its socks port)

Add the DataDirectory command option (ConfigurationNames.cs & Configuration.cs)

Removed those lines

/** TEMPORARY: DELETE LATER **/
builder.AppendFormat(" --SocksPort 9050");

as it prevents to use the SetConfig(ConfigurationNames.SocksPort, Port0 --> 2 command would be append and it would crash.
Add the DataDirectory command line option. the Configuration.cs is changed accordingly
Add the DataDirectory option. The ConfigurationNames.cs is changed accordingly
Update ConfigurationNames.cs
Update ClientCreateParams.cs
@tkowalczyk
Copy link

@PsykotropyK is this lib work for you?

`ClientRemoteParams remoteParams = new ClientRemoteParams();
        remoteParams.Address = "127.0.0.1";
        remoteParams.ControlPassword = "";
        remoteParams.ControlPort = 9051;

        Client client = Client.CreateForRemote(remoteParams);

        client.Proxy.Port = 8182;

        using (WebClient webClient = new WebClient())
        {
            if (client.Proxy.IsRunning)
                webClient.Proxy = client.Proxy.WebProxy;

            Console.WriteLine(webClient.DownloadString("http://bot.whatismyipaddress.com/"));
        }`

running the above code will give you a IP address of Tor node actually conected to?

@PsykotropyK
Copy link
Author

PsykotropyK commented Mar 17, 2017

@tkowalczyk

I did not try your specific piece of code, but when I start usting the library I realized that I could not use webClient.Proxy = client.Proxy.WebProxy;. I had to recreate the proxy for the http client.

Something like this should work :

webClient.Proxy = new Webproxy() { Address = new Uri(client.Proxy.Address) };
Then It showed a Tor exit node ip instead of my ip.

Hope it will help you.

Ciao

@tkowalczyk
Copy link

@PsykotropyK by WebProxy class you mean this or some custom?

@PsykotropyK
Copy link
Author

Yes, System.Net

@knocte
Copy link

knocte commented Jan 20, 2020

So then does this lib work or not? It seems abandoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants