Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 有没有办法使用SeleniumWebDriver在世界不同地区自动生成页面_Java_Selenium Webdriver - Fatal编程技术网

Java 有没有办法使用SeleniumWebDriver在世界不同地区自动生成页面

Java 有没有办法使用SeleniumWebDriver在世界不同地区自动生成页面,java,selenium-webdriver,Java,Selenium Webdriver,例如,我为巴基斯坦屏蔽了我的站点。那么我如何从巴基斯坦端自动检查我的站点是否被屏蔽。我们通过silvertunnel lib使用TOR来解决这个问题 这些文件: 这是很久以前的事了,所以我没有更多的代码,但这里有几个链接供参考: 请参阅:SO的期望是,用户提问时不仅要进行研究以回答自己的问题,还要分享研究、代码尝试和结果。这表明你花了时间来帮助自己,它使我们避免重复显而易见的答案,最重要的是,它帮助你得到一个更具体和相关的答案!另见: import java.io.IOException;

例如,我为巴基斯坦屏蔽了我的站点。那么我如何从巴基斯坦端自动检查我的站点是否被屏蔽。

我们通过silvertunnel lib使用TOR来解决这个问题

这些文件:

这是很久以前的事了,所以我没有更多的代码,但这里有几个链接供参考:

  • 请参阅:SO的期望是,用户提问时不仅要进行研究以回答自己的问题,还要分享研究、代码尝试和结果。这表明你花了时间来帮助自己,它使我们避免重复显而易见的答案,最重要的是,它帮助你得到一个更具体和相关的答案!另见:
    import java.io.IOException;
    import java.net.Socket;
    
    import net.freehaven.tor.control.TorControlConnection;
    
    public class Main {
      public static void main(String[] args) throws IOException {
        //Connecting to TOR's control port
        //TOR must be running and following line must be added to the torrc:
        //ControlPort 9100
        Socket s = new Socket("127.0.0.1", 9100);
        TorControlConnection conn = TorControlConnection.getConnection(s);
        //no authentification at the moment
        conn.authenticate(new byte[0]);
    
        //write some changes to torrc (like setting exit node)
        //ExitNodes {US}
        //StrictExitNodes 1
    
    
        //send "RELOAD" signal - reloading torrc from disk
         conn.signal("RELOAD");
      }
    }