TOR in Java

  • TOR in Java

    Hallo,

    ich versuche grad TOR in Java einzubinden. Also eine Webseite heruntrelade mittles TOR. Mein Code:

    Quellcode

    1. System.setProperty("http.proxyHost","127.0.0.1");
    2. System.setProperty("http.proxyPort","9050");
    3. try{
    4. URL url=new URL("http://www.wieistmeineip.de/");
    5. try {
    6. InputStream is=url.openStream();
    7. int i;
    8. while(( i=is.read())>-1){
    9. System.out.write(i);
    10. }
    11. } catch (IOException ex) {
    12. ex.printStackTrace();
    13. }
    14. } catch (MalformedURLException ex) {
    15. ex.printStackTrace();
    16. }
    Alles anzeigen


    Leider gibts ne IOException:

    java.io.IOException: Server returned HTTP response code: 501 for URL: wieistmeineip.de/
    at sun.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at Run.main(Run.java:28)


    Ich benutze TOR-Button...

    Hat einer Informationen wie das steuern von TOR funktioniert... aka. ich möchte neue IP