- Hybrid Cloud for Architects
- Alok Shrivastwa
- 198字
- 2021-06-24 19:27:38
Case 2 – with a proxy
When we make the request with a proxy, the browser only connects to the proxy and not the actual website. So, the difference in the commands is as follows:
telnet <Proxy IP> <Proxy Port>
GET http://www.google.com/ HTTP/1.1
Host: www.google.com
Connection: Close
As we can see, instead of sending only the / as a parameter to the GET, we send the full URL, so that the proxy server can make the request on our behalf.
This will work for HTTP (unencrypted), however for HTTPS the telnet utility shouldn't be used for testing, the openssl command should be used.
A sample of the HTTPS connection is shown as follows (provided openssl is installed on your terminal).
We will use the s_client or the secure client in the OpenSSL library. The command is shown as follows (used instead of telnet <ip> <port> shown in the preceding example):
openssl s_client -connect www.google.com:443.
A sample of the HTTPS connection is shown as follows (provided openssl is installed on your terminal).
We will use the s_client or the secure client in the OpenSSL library. The command is shown as follows (used instead of telnet <ip> <port> shown in the preceding example):
openssl s_client -connect www.google.com:443.
This will then establish a secure channel to the server (by agreeing on the cipher, verifying the certificate, and changing the cipher spec). Once it is done, you can continue to use the HTTP commands as before (GET, Host, Connection, and so on).
推薦閱讀
- 玩轉(zhuǎn)智能機器人程小奔
- 7天精通Dreamweaver CS5網(wǎng)頁設(shè)計與制作
- WOW!Illustrator CS6完全自學(xué)寶典
- 現(xiàn)代機械運動控制技術(shù)
- 網(wǎng)絡(luò)綜合布線設(shè)計與施工技術(shù)
- Learning C for Arduino
- 數(shù)據(jù)庫系統(tǒng)原理及應(yīng)用教程(第5版)
- 傳感器與新聞
- 奇點將至
- 經(jīng)典Java EE企業(yè)應(yīng)用實戰(zhàn)
- C#求職寶典
- 軟測之魂
- 運動控制系統(tǒng)
- Python語言從入門到精通
- 輸送技術(shù)、設(shè)備與工業(yè)應(yīng)用