Linux客戶端curl 正向代理訪問測試


http的訪問測試

[root@localhost ~]# curl -I --proxy 192.168.10.10:80 www.baidu.com HTTP/1.1 200 OK Server: nginx/1.12.1 Date: Mon, 11 Jun 2018 15:37:47 GMT Content-Type: text/html Content-Length: 612 Last-Modified: Thu, 31 May 2018 09:28:16 GMT Connection: keep-alive ETag: "5b0fc030-264" Accept-Ranges: bytes https的訪問測試 [root@localhost ~]# curl -I --proxy 192.168.10.10:443 www.baidu.com HTTP/1.1 200 OK Server: nginx/1.12.1 Date: Mon, 11 Jun 2018 15:38:07 GMT Content-Type: text/html Content-Length: 277 Connection: keep-alive Accept-Ranges: bytes Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Etag: "575e1f5c-115" Last-Modified: Mon, 13 Jun 2016 02:50:04 GMT Pragma: no-cache 5、設置Linux客戶端全局代理 [root@localhost ~]# vim /etc/profile export http_proxy='192.168.10.10:80' export http_proxy='192.168.10.10:443' export ftp_proxy='192.168.10.10:80' [root@localhost ~]# source /etc/profile [root@localhost ~]# curl -I www.baidu.com:80 HTTP/1.1 200 OK Server: nginx/1.12.1 Date: Mon, 11 Jun 2018 16:10:18 GMT Content-Type: text/html Content-Length: 277 Connection: keep-alive Accept-Ranges: bytes Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Etag: "575e1f5c-115" Last-Modified: Mon, 13 Jun 2016 02:50:04 GMT Pragma: no-cache [root@localhost ~]# curl -I www.baidu.com:443 HTTP/1.1 200 OK Server: nginx/1.12.1 Date: Mon, 11 Jun 2018 16:10:27 GMT Content-Type: text/html Content-Length: 277 Connection: keep-alive Accept-Ranges: bytes Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Etag: "575e1f59-115" Last-Modified: Mon, 13 Jun 2016 02:50:01 GMT Pragma: no-cache


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM