English 中文(简体)
缩略语 IP - Potential?
原标题:Bind selenium to a specific IP - Possible?

同许多人一样,我们通过下列指挥开始使用ium服务器:

java -jar selenium-server-standalone-2.21.0.jar

我们发现的是,这种 open在0.0.0.0:4444。

Started SocketListener on 0.0.0.0:4444

[USER @ BOX ~]# netstat -na | grep LISTEN | grep 4444
tcp        0      0 :::4444                     :::*                        LISTEN

是否有办法将ium与特定ip(当地host)联系起来?

感谢。

问题回答

使用以下指挥

    java -jar selenium-server-standalone-2.21.0.jar -host 192.168.1.100

192.168.1.100 是东道国的IP地址

这不是解决这一问题的正确方式,而是解决问题的方式。

因此,这样做的只是从任何外部来源向4444号港转移任何联系。 你们可以首先用上页加以测试。

开办服务器

java -jar selenium-server-standalone-2.39.0.jar -host 127.0.0.1 -port 4444 

核查一切工作

http://yourexternalip:4444/wd/hub/

页: 1 如果您的服务器运行正常的话。

派遣指挥部

sudo iptables -A INPUT -p tcp --dport 4444 -s 127.0.0.1 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 4444 -j DROP

之后再上页。 网页将不再开放(因为你正在从外部IP获得)。

页: 1

http://127.0.0.1:4444/wd/hub/

工作

这再次成为向更大问题提供的帮派援助,这样做不会迫使你改变任何来源法,仍然维持安全制度。

添加“东道方 192.168.1.100”参数是可能的,但前提是你在你的版本中确定:

https://code.google.com/p/selenium/source/detail?r=71c5e231f442

(在撰写本报告时列入现有双册的帽子,以便你从源头上建设自己。)

I was also facing the same problem with the Hub. So my Hub is pointing toward some other IP address when I tried to UP the hub, but when I check my IP address it was different on my local system. To overcome the problem I just tried the following code and it works.

java -jar selenium-server-standalone-3.12.0.jar -host 192.XXX.X.XX -role hub

我的中心被登记到我的当地机器人IP地址。

页: 1

之后,在你的script中,你对网络用户进行远程管理。

在废墟中,你可以这样做。

@driver = Selenium::WebDriver.for(:remote, :url => "http://specific_ip_of_remotemachine:4444", :desired_capabilities => firefox)

这是你所期待的吗?





相关问题
How to get IP address from sockaddr

I want to try and get the ip address of a client after calling accept. This is what I have so far, but I just end up getting some long number that is clearly not an ip address. What could be wrong? ...

printing ip addresses using gdb

I am debugging a networking code and want to print ip addresses which are declared as int32. when i print it using gdb print command, i get some values which is not much meaningful. How can i ...

Using Clients IP as the Servers IP

This might be one of those "huh, why?" questions, but I figured it would be worth the try. How would one, from a server-side application, use the clients IP address as the applications IP address to ...

where is class E ip addresses?

I am reading Richard Stevens TCP/IP illustrated Vol1.He said class E ip addresses are reserved for future use.Considering he wrote the book at 1994,now is the future.So where is the class E ip ...

multicast ip address - blocked in call to recvfrom

i am writing a simple multicast application. i intend to run it on localhost. i have done the following: char *maddr; . . . sendfd = socket(...); struct sockaddr_in sasend; sasend.sin_family = ...

热门标签