开发者

Change the IP-adress of a url in Chrome using a regular expression or similar

I work in a environment where I have to change a ip-adress in the hosts-file a lot.

The situation:

MyDomain.com runs local for development and on a public ip adress. I would like to add a button t开发者_StackOverflow中文版o chrome who will switch between the ip's.

By example:

  1. Click button to run route MyDomain.com from 192.168.0.1
  2. Click button to run route MyDOmain.com from 89.12.11.10

Please note: I can not view the website by just approaching the ip-adress. It needs a approach with the full domain www.MyDomain.com.

This looks like a very close solution but misses the route from the ip:

Change the current URL in Chrome using a regular expression or similar

Does someone know how I can accomplish this for Google Chrome? Is it even possible with javascript?


You won't be able to do it using javascript Chrome API. If you are willing to take NPAPI route then maybe there is a way, but it won't be an easy one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜