0

I currently have multiple network alias (eth0, eht0:1, eth0:2), each having their own private ip which has its own public ip. When using remote web driver with phantomjs (ghostdriver), it always chooses the local host (See BUG https://github.com/ariya/phantomjs/issues/10269), for client argument --webdriver=ip:port, thus I cannot rely on phantomjs to pick the correct interface.

I am currently under the impression that I will have to use IPTABLES. I want to route ever instance of my java program using remote web driver to a different public ip when connecting to the phantomjs (ghostdriver) driver. Currently I can only control the port that it listens on.

Any suggestions would be greatly appreciated.

4

1 回答 1

2

迄今为止解决此问题的最佳方法是使用反向代理。使用带有 phantomjs 的代理选项来指定代理 ip 和端口,并配置反向代理以将该流量重定向出去。

于 2015-05-22T15:53:00.707 回答