วันจันทร์ที่ 26 มีนาคม พ.ศ. 2555

What's in a PAC File?

You've been into the LAN settings of your browser many times and you probably wondered what the automatic configuration script is. That script is basically a file stored as a PAC file. A PAC file instructs your browser how to connect to the different sites in the internet.

This PAC file is basically a text file which has some JavaScript codes in it. It is commonly called proxy.pac, but it can be named differently. For most of the home users, this script is not needed since they are connected to the internet directly. But if you're using a number of proxies, and each proxy is dedicated to some sites, you will need to use this file.

A very basic PAC file contains a single function defining the instruction. Without being too technical, that function basically finds the appropriate proxy for a particular URL or website request. A particular return value of that function can be "PROXY myProxy.com:8080; DIRECT." This return value states that all requested URLs will go through myProxy.com server using the port 8080. And if that request fails, the request will bypass the proxy and go direct. Let's say your proxy for the internet is myProxy.com and uses port 8080. When you type a website in your browser, the browser will try to check the script first. Since the script has this value, all your website requests will go through the proxy. If your request can't be found by that proxy, then the request will go directly to the internet server, as defined by your provider.

This PAC file can reside anywhere in your local drive. But for organizational purpose and correctness, this file should be in this folder, C:\Windows\system32\drivers\etc. This folder is reserved for system files. This PAC file should be placed there since it is a system file.

To use this file, open your browser and go to the LAN settings. From the Tools menu of your browser, select Internet Options.... Go to the Connections tab in the popup window and locate the LAN settings at the bottom. Click the LAN settings button and on the top of another popup window is the automatic configuration portion. Check the "Use automatic configuration script" then specify the address. You should use "file://C:/Windows/system32/drivers/etc/proxy.pac" as the address. This value assumes that your script is named proxy.pac and you have your windows installed at the C drive.

A PAC file is basically another way of using proxies. It can be as simple as having one function or as complex as having multiple functions.

Best HDTV Deals Cheap Shallow Foundation

ไม่มีความคิดเห็น:

แสดงความคิดเห็น