anyone knows how i can send the NEWNYM signal to TOR through java code?
Say I have this:
String adress = "http://some-adress";
WebClient webClient = new WebClient(BrowserVersion.FIREFOX_52);
ProxyConfig proxyConfig = new ProxyConfig("127.0.0.1", 9150, true);
webClient.getOptions().setProxyConfig(proxyConfig);
webClient.getOptions().setJavaScriptEnabled(false);
webClient.getOptions().setUseInsecureSSL(true);
HtmlPage page = (HtmlPage)webClient.getPage(adress);
And technically i can do this to restart the application, and get a new identity:
Runtime.getRuntime().exec("C:/Users/user/Desktop/Tor Browser/Browser/firefox.exe");
Runtime.getRuntime().exec("TASKKILL /F /IM firefox.exe");
But there must be a way to send the NEWNYM signal, because to get a new identity with TOR this way is quite messy.
Can anyone help me out?