HTTP protocol (v)---Proxy

Source: Internet
Author: User
Tags session id

HTTP protocol (v) proxy

What is a proxy server

The Web Proxy server is the intermediary entity of the network. The agent sits between the Web client and the Web server, playing the role of "middleman".

The proxy server for HTTP is the Web server and the Web client.

Fiddler is a typical agent.

Fiddler is working as a proxy Web server, which uses proxy addresses: 127.0.0.1, Port: 8888. When Fiddler exits, it automatically unregisters the agent, so that it does not affect other programs.

the role of the agent one, FQ

a lot of people like to use Facebook, watch YouTube.  But we in the celestial, Celestial has the Great of Wall (Great Wall Firewall), blocked these good website.   What to do? Through the agent to jumps over, you can access the.

It's a hassle to find a proxy server yourself. It's usually used FQ software to automatically discover the proxy server.

role of the agent two, Anonymous Access

often listen to the news, said , "xxx" posted on the Internet post, was cross-province hunting. If he uses an anonymous proxy server, it's not easy to reveal his identity.

The anonymity of the HTTP proxy server means that the HTTP proxy server hides the original user's IP address and other details from the remote server by removing the identity attribute in the HTTP message (such as the client's IP address, or the cookie, or the session ID of the URI). also The log of the original user access record is not recorded on the HTTP proxy server (otherwise it will be found).

the role of the agent three, Internet via proxy

such as LAN can not Internet, Internet access can only be done via a proxy server within the LAN.

role of the agent four, Speed up the Internet with proxy caching

most proxies have the function of caching, like a large cache, which has a lot of storage space, which constantly stores the new acquired data on its local storage, if the data requested by the browser already exists on its native memory and is up-to-date, Then it will not re-fetch data from the Web server, but directly to the memory of the data on the user's browser, so that can significantly improve the browsing speed.

Role of the agent five: child filter

many educational institutions, The Filter agent is used to prevent students from accessing adult content.

IE proxy settings: Manually set up the agent

IE can be manually set up the agent, very simple, specify an IP address and port on it. Such as.

tools -> Internet Options, connections-LAN settings (shortcut keys)

if the proxy server's The IP address has changed, or the port number has changed. Do you want hundreds of client browsers to modify the browser settings?  Impossable This is too difficult to maintain. There is also a more advanced approach to this point.

IE proxy settings: Using automatic configuration script (PAC)

Manually configuring the agent is simple, but not flexible. Only one proxy server can be specified, and failover is not supported.

generally used in large companies PAC file to configure. You only need to specify the URL of the PAC file.

A PAC (Proxy Auto Config) file is a text file of a small JavaScript program, with a suffix of. dat.

when the browser accesses the network, it is based on The JavaScript function in the PAC file to select the appropriate proxy server.

Contents of the Sample_pac.dat file

function FindProxyForURL (URL, host) {

if (url.substring (0, 5) = = "http:") {

The specified proxy should be used

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 connect, without any agent

return "DIRECT";

}

}

IE proxy settings: Auto detect settings (WPAD)

The browser can use the WPAD protocol by simply checking "Automatically detect settings", and WPAD will automatically find the URL of the PAC file. WPAD will use a series of resource discovery techniques (DHCP,DNS, etc.) to find PAC files.

agent authentication, and 407 status codes

proxy servers can also require permission authentication, HTTP defines a mechanism called Agent authentication (proxy authentication). This mechanism can block requests for content.

when a browser accesses a proxy that requires authentication, The proxy server returns 407 Authorization Required, telling the browser to enter a user name and password.

Agent Certification and HTTP Basic authentication is the same mechanism, if you need to understand the mechanism of proxy authentication, see [Basic Authentication of HTTP protocol]

Security issues using a proxy server

Proxy Server and capture tool (e.g. Fiddler) can see the data in the HTTP request. If we send a request with sensitive data, such as username, password, credit card number. This information will be seen by the proxy server. So very dangerous.  So we usually use HTTPS to encrypt the HTTP request. This way the proxy server will not see the data inside.

How to build a proxy server

can use Ccproxy, and squid to build a proxy server.

HTTP protocol (v)---Proxy

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.