Proxy.PAC, guess this falls under webdesign |
![]() ![]() |
Proxy.PAC, guess this falls under webdesign |
Jun 25 2007, 10:51 AM
Post
#1
|
|
![]() Ruler of Omicron Persei 8 Posts: 23,240 From: Knoxvegas OS: 3.1, 95, 98SE, xp, 2000, NT4, 2003 Standard Edition, linux (various flavors) |
i guess this COULD go in networking...but....you guys might have better luck with it
i'm trying to create a PAC file (Proxy Automatic Configuration)...so that i can instate a little automatic proxy redundancy as well as automatic configuration (so i don't have to walk around as much when there's a bunch of goobers visiting work) i've found a lot of good resources on PAC files...but it's all greek to me as i only know two things about JS....diddely and squat here's my basic PAC (coincidentally...the only one i've been able to get working) CODE function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".<MyDomain>")) return "DIRECT"; else return "PROXY <WebFilterDNSNameAndPort>; <SecondaryProxyDNSNameAndPort>; DIRECT"; } i can direct my IE to this PAC file for configuration then test at http://www.proxyserverprivacy.com/adv-free...-detector.shtml and it will show that i am indeed using the first proxy in the list (after the return "proxy" deal...) and if i replace the "mydomain" with the domain of that testing site (proxyserverprivacy.com) then it will show that i am indeed not using the proxy...so i know it's reading that line and parsing the logic however...if i add any more domain names in the first section (which is supposed to be a list of things that can be accessed directly instead of via proxy) then the tests fail and the proxy isn't being applied....i assume this is because i don't know anything about how to write JS...would i need to put more IF statements in there? or maybe an or? does JS do or statements? like if the domain matches this, OR, this OR this then do this else do the other thing? any help would be appreciated |
|
|
Jul 5 2007, 11:49 PM
Post
#2
|
|
|
Member ![]() ![]() ![]() Posts: 100 OS: xubuntu, windows xp pro |
I am having the same troubles, however I am using this as a.. Firewall if you will; something that comes before access to my web of servers (each server has a random/hidden IP so that hackers have a harder time figuring out how to mess with the servers as a whole. Then again, there is free software for private use (unfortunately for me, the keyword is "private"). I haven't found any completely free software in this area. And if you are worried about security, then using javascript on public access most likely isn't a great idea (I uploaded my scripts and what not to my router).
My problem is when I turn this script on (that decides what random IP to say the server is on for each individual user) it will actually direct the user to that IP address through my server, so basically I become a proxy. QUOTE(dsenette @ Jun 25 2007, 11:51 AM) [snapback]995239[/snapback] i guess this COULD go in networking...but....you guys might have better luck with it i'm trying to create a PAC file (Proxy Automatic Configuration)...so that i can instate a little automatic proxy redundancy as well as automatic configuration (so i don't have to walk around as much when there's a bunch of goobers visiting work) i've found a lot of good resources on PAC files...but it's all greek to me as i only know two things about JS....diddely and squat here's my basic PAC (coincidentally...the only one i've been able to get working) CODE function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".<MyDomain>")) return "DIRECT"; else return "PROXY <WebFilterDNSNameAndPort>; <SecondaryProxyDNSNameAndPort>; DIRECT"; } i can direct my IE to this PAC file for configuration then test at http://www.proxyserverprivacy.com/adv-free...-detector.shtml and it will show that i am indeed using the first proxy in the list (after the return "proxy" deal...) and if i replace the "mydomain" with the domain of that testing site (proxyserverprivacy.com) then it will show that i am indeed not using the proxy...so i know it's reading that line and parsing the logic however...if i add any more domain names in the first section (which is supposed to be a list of things that can be accessed directly instead of via proxy) then the tests fail and the proxy isn't being applied....i assume this is because i don't know anything about how to write JS...would i need to put more IF statements in there? or maybe an or? does JS do or statements? like if the domain matches this, OR, this OR this then do this else do the other thing? any help would be appreciated |
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
20 / 556 | 15th January 2010 - 03:04 AM EHeuters started - last by azarl |
|||||
![]() |
1 / 88 | 1st January 2010 - 03:45 AM asbestosfriend started - last by Neil Jones |
|||||
![]() |
1 / 74 | 28th January 2010 - 03:48 AM thedog2009 started - last by Neil Jones |
|||||
![]() |
8 / 111 | 3rd February 2010 - 04:38 PM bigdog1100 started - last by noahdfear |
|||||
|
Time is now: 9th February 2010 - 08:22 AM |
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm. However, we do not guarantee that they are accurate and they are to be used at your own risk. All trademarks mentioned on this page are the property of their respective owners.
© Geeks to Go, Inc. | All Rights Reserved | Privacy Policy | Advertising