k-strider Posted July 4, 2007 Posted July 4, 2007 I am playing with using WPAD.DAT to get the proxy settings and its working in a sense the first if works ie if its localy hosted don't use proxy, also the last/end return works. i cant get it to work on client ip. i have a section of ips 10.7.58.x that are reserved for networking kit and admin workstations so i was hoping to use WPAD to redirect them over another unfiltered proxy. and well i just can't see what im doing wrong :S i based some of my code on this site. http://www.novell.com/coolsolutions/feature/7949.html anyone done anything like this before or know a way to see what the myIpAddress function is returning? function FindProxyForURL(url, host) { var myip=myIpAddress(); var ipbits=myip.split("."); var myseg=parseInt(ipbits[2]); if (isInNet(host, "10.7.56.0", "255.255.252.0")) { return "DIRECT";} //if (shExpMatch(host, "*microsoft.com*")){ // return "PROXY unfilteredproxy:8080";} //if (isInNet(myIpAddress(), "10.7.58.0", "255.255.252.0")) { // return "PROXY unfilteredproxy:8080";} if (myseg == 58) { return "PROXY unfilteredproxy:8080; DIRECT";} return "PROXY proxy:8080; DIRECT"; }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now