lightbody/browsermob-proxy — pull request #23 by dpapworth (2013-08-31 20:44:30+00:00)
Title: Allow binding of ProxyServer to a alternative host address

This is to allow an alternative network interface to be used for the proxy, such as VPN interface. Although the ProxyServer allows connection through all interfaces, the address used in the proxy string passed to Selenium is not correct.

proxyServer = new ProxyServer(proxyPort);

// Specify connection via Juniper VPN interface
NetworkInterface vpn = NetworkInterface.getByName("jnc0");
proxyServer.setLocalHost(vpn.getInetAddresses().nextElement());

proxyServer.start();