Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Proxy.PAC


  • Please log in to reply

#1
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
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)

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.proxyserv...-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
  • 0

Advertisements


#2
I.D.S. Administrator

I.D.S. Administrator

    Member

  • Member
  • PipPipPip
  • 100 posts
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.

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)

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.proxyserv...-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


  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP