Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to define specific proxy according the network I am connected and I tried to apply this solution, but this line:

 var ip = myIpAddress();

Does not give me the IP address of my wired interface but the address of one of my virtual interface (I have VMPlayer installed).

Is there any way to get the current IP for a defined interface inside the proxy pac file?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

I was able to use the following workaround for this problem:

In the Control Panel\Network and Internet\Network Connections view, it list all the network interfaces of the computer. By choosing Advanced -> Advanced Settings it shows a property windows with all the interfaces and an arrow to chenge their order.

By this way I was able to put the LocalNetwork (wired) before the Wireless Network and the virtuals networks VMNet1 and VMNet8 at the end.

After this re-ordering, the function myIpAddress() takes now the wired IP address and no more one of the Virtual Network address.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.