On Tue, 12 Oct 1999, Marc G. Fournier wrote:
> Basically, I want it so that "if myIpAddress() != 131.162.*, return
> DIRECT", but...how do you tell JavaScript to do a substring to check the
> first 7 characters returned by myIpAddress()?
I had to solve the same problem here for some roaming laptop users who
dialed into outside ISPs occasionally.
// If the client is not on our private network (such as a roaming
// client), do not use the proxy server.
if (!isInNet(myIpAddress(), "192.168.0.0", "255.255.0.0"))
return "DIRECT";
[the remaining code goes here...]
If the client does NOT have an address of 192.168.*, it returns
DIRECT, otherwise it falls through to the remaining code which tells
it to use the proxy.
-- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net
FreeBSD: The fastest and most stable server OS on the planet.
For Intel x86 and Alpha architectures (SPARC under development).
( http://www.freebsd.org )
"One should admire Windows users. It takes a great deal of
courage to trust Windows with your data."
Received on Wed Oct 13 1999 - 15:46:43 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:48 MST