HTTP Proxy)

Source: Internet
Author: User
Tags http authentication

I have written an article [http protocol details]. This article introduces the proxy server, which is an important component of the HTTP protocol and plays an important role. This article introduces some concepts and working principles of HTTP proxy servers.

 

Reading directory

  1. What is a proxy server?
  2. Fiddler is a typical proxy.
  3. Proxy role 1: turning over the wall
  4. Proxy role 2: Anonymous Access
  5. Proxy 3: accessing the Internet through proxy
  6. Proxy function 4: speed up Internet access through Proxy Cache
  7. Proxy function 5: Children's filter
  8. IE proxy settings: manually set proxy
  9. IE proxy settings: use the automatic configuration script (PAC)
  10. IE proxy settings: Automatic Detection settings (WPAD)
  11. Proxy authentication, status code 407
  12. Proxy server security issues
  13. How to Set up a Proxy Server

 

What is a proxy server?

The Web Proxy Server is the intermediate entity of the network. The proxy is located between the Web Client and the Web server and acts as the "intermediary.

The HTTP Proxy Server is the Web server and the Web Client.

 

 

Fiddler is a typical proxy.

Fiddler works as a proxy Web server. It uses the proxy address 127.0.0.1 and port: 8888. When fiddler exits, it will automatically log out of the proxy so that it will not affect other programs.

 

 

Role 1 of proxy

Many people like Facebook and watch YouTube. However, in tianchao, tianchao has the great of wall (Great Wall firewall), blocking these good websites. What should I do? You can use the proxy to jump to the wall.

It is very troublesome to search for a proxy server by yourself. Generally, the proxy server is automatically discovered using the wall-over software.

 

Role 2: Anonymous Access

I often listen to the news and say "a certain person" posted a post on the Internet, and the post was captured across provinces. If he uses an anonymous proxy server, his identity will not be easily exposed.

The anonymity of the HTTP Proxy Server refers to the identity characteristics (such as the Client IP address, Cookie, or Uri session ID) in the HTTP Proxy Server by deleting the HTTP packet ), in this way, the IP address of the original user and other details are hidden from the remote server. At the same time, the HTTP Proxy server does not record the log of the original user access record (otherwise it will be found ).

 

Proxy Function 3: access the Internet through proxy

For example, you can only access the Internet through a proxy server in the LAN.

 

Proxy function 4: speed up Internet access through Proxy Cache

Most proxy servers have the cache function. It is like a large cache, which has a large storage space and keeps storing new data to its local storage, if the data requested by the browser already exists and is up-to-date on its local memory, it will not retrieve data from the Web server again, the data stored in the memory is directly transmitted to the user's browser, which can significantly improve the browsing speed.

Role of proxy 5: Child Filter

Many educational institutions use filters to prevent students from accessing adult content.

 

IE proxy settings: manually set proxy

You can manually set the proxy in IE. You can simply specify an IP address and port. For example.

Tools> Internet Options> connections> LAN Settings (shortcut keys)

If the IP address of the proxy server is changed or the port number is changed. Does it take hundreds of clients to modify browser settings? Impossable is too difficult to maintain. There is also a more advanced method.

IE proxy settings: use the automatic configuration script (PAC)

Manual proxy configuration is simple, but not flexible. Only one proxy server can be specified, and Failover is not supported.

Generally, large companies use PAC files for configuration. You only need to specify the URL of the PAC file,

The PAC (proxy auto config) file is a text file of a small JavaScript program with the suffix. dat.

When the browser accesses the network, it selects an appropriate proxy server based on the JavaScript function in the PAC file.

Sample_pac.dat File Content

Function findproxyforurl (URL, host) {If (URL. substring (0, 5) = "http:") {// use the specified proxy return "proxy Proxy: 80";} else if (URL. substring (0, 4) = "ftp:") {return "proxy fproxy: 80";} else if (URL. substring (0, 7) = "Gopher:") {return "proxy gproxy";} else if (URL. substring (0, 6) = "https:") {return "proxy secproxy: 8080";} else {// direct connection without going through any proxy return "direct ";}}

 

 

IE proxy settings: Automatic Detection settings (WPAD)

The browser selects "Automatic Detection Settings" to use the WPAD protocol. The WPAD automatically finds the URL of the PAC file. WPAD uses a series of resource discovery technologies (DHCP, DNS, etc.) to find the PAC file.

 

Proxy authentication and 407 status code

The proxy server can also require permission authentication. Http defines a mechanism called proxy authentication. This mechanism can block content requests.

When the browser accesses the proxy that requires authentication, the proxy server returns 407 authorization required, telling the browser to enter the user name and password.

Proxy authentication is the same as HTTP Basic Authentication. For details about proxy authentication, refer to [basic HTTP Authentication].

 

Proxy server security issues

Both the proxy server and the packet capture tool (such as fiddler) can view the data in the HTTP request. If the request we send contains sensitive data, such as the user name, password, and credit card number. This information will be viewed by the proxy server. So it is very dangerous. Therefore, we usually use HTTPS to encrypt the HTTP request, so that the proxy server will not be able to see the data in it.

 

How to Set up a Proxy Server

You can use CCProxy and squid to build proxy servers.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.