• 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
  • 相关阅读:
    win7 下如何安装 Microsoft Web Application Stress Tool
    [译文]casperjs的API-mouse模块
    【性能测试】jmeter的坑(1)——如何在多网卡情况下正确连接
    [性能分析]端口限制
    [性能分析]linux文件描述符
    python 对mongodb进行压力测试
    常用jar包信息
    Basic Grammer
    Maven 知识汇总
    【Linux】Linux常用命令
  • 原文地址:https://www.cnblogs.com/weifeng1463/p/13201789.html
Copyright © 2020-2023  润新知