Monday, February 12, 2007

How the proxy server works ?

How the proxy server works

Once you have configured your web browser as described, your browser will load a CGI script each time it is restarted. This script redefines the function that determines how to fetch the URL that is being requested. If the URL matches a pattern or a site that requires a proxy, it will connect to the proxy server rather than going directly to the site.
--------------------------------------------------------------------------------(USR = User on IBM.Net or another ISP; PXY = BOL web proxy server; SRV = web server restricted to UCLA)
Step 1: User starts browser, connects to proxy server to get the Proxy Automatic Configuration (PAC) file. fetch request: proxy.ucla.edu/cgi/proxy
+-----+ +-----+ U P S ==================> X R Y +-----+ +-----+
Step 2: Proxy server returns "proxy", which configures browser to do proxying.
+-----+ +-----+ U "proxy" loaded P S <================== X R Y +-----+ +-----+
Step 3: User requests URL, URL compared against function retrieved from "proxy", connection route is determined.
Step 4a: Route for URL returned from function is "DIRECT" (no proxy required). Browser retrieves URL directly. (*Note: At this point, every URL returns "DIRECT" unless it is one that is known to restrict access to ucla.edu*)
+-----+ +-----+ U fetch URL S S <==================> R R V +-----+ +-----+
Step 4b1: Route for URL returned from function is "PROXY xxxxx" (proxy required). Browser contacts proxy server and requests page.
+-----+ +-----+ +-----+ U request URL P S S ==================> X R R Y V +-----+ +-----+ +-----+
Step 4b2: Proxy contacts server and requests page.
+-----+ +-----+ +-----+ U P request URL S S X ==================> R R Y V +-----+ +-----+ +-----+
Step 4b3: Server sees request from ucla.edu domain (proxy address) and returns URL to proxy.
+-----+ +-----+ +-----+ U P return URL S S X <================== R R Y V +-----+ +-----+ +-----+
Step 4b4: Proxy returns URL to User.
+-----+ +-----+ +-----+ U return URL P S S <================== X R R Y V +-----+ +-----+ +-----+

No comments: