Connect to the destination protocol through HTTP Proxy

Source: Internet
Author: User

Connect to the destination protocol through HTTP Proxy

When connecting to the target server through HTTP proxy, you must first establish a connection to the proxy server. Then you need to send the connection message:
Connect <destination IP address>: <destination port> HTTP/1.1 \ r \ n
<Request Header> \ r \ n
<Request Header> \ r \ n
...
<Request Header> \ r \ n

After the message is sent, the proxy server tries to connect to the target server. If the message is successful, the message "HTTP/1.1 200..." is returned, indicating that the connection to the target server is successful. Then you can use this connection. If the returned response code is not 200, the connection fails and the proxy server closes the connection.
The returned Message format is as follows:
HTTP/1.1 <response code> <message> \ r \ n
<Response Header> \ r \ n
<Response Header> \ r \ n
...
<Response Header> \ r \ n

 

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.