JackieJ / proxy-vole

Automatically exported from code.google.com/p/proxy-vole
0 stars 1 forks source link

Allow PacScriptMethods.myIpAddress() to return a preconfigured IP address #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Feature request:

For multi homed (multiple NICs) setups and for testing PAC files it would be 
very useful to have the ability to specify the clients IP address through a 
property of the class PacScriptParser. The property setter should update a 
property of the class PacScriptMethods. If an IP address is set that way the 
method myIpAddress should return just this address.

Original issue reported on code.google.com by falk.joh...@googlemail.com on 10 Dec 2010 at 8:30

GoogleCodeExporter commented 8 years ago
Hi
I will evaluate this. I do not want to add public methods to the API that are 
only used for testing purpose. Would a system property also do the job.

Lets say you do System.setProperty("com.btr.proxy.pac.overrideLocalIP", 
"192.168.0.123");

The PacScriptMethods will then test for the existence of this property and use 
it.

Original comment by rosstaus...@googlemail.com on 11 Dec 2010 at 12:05

GoogleCodeExporter commented 8 years ago
Yes, I think a system property will do as well.

Thank you,
Falk

Original comment by falk.joh...@googlemail.com on 11 Dec 2010 at 12:14

GoogleCodeExporter commented 8 years ago
Hello Falk,
I just checked in some changes to the repository. I added the system property 
com.btr.proxy.pac.overrideLocalIP 

I will not build a new version because of this minor change so you have to grab 
the latest version from SVN. But that one is very stable.

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 11 Dec 2010 at 11:42