zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    如何在Eclipse中查看Java类库的源代码以及相应的api
    深入剖析ConcurrentHashMap
    Java7/8 中的 HashMap 和 ConcurrentHashMap 全解析
    Quartz配置
    Spring 自动定时任务配置
    @Resource注解的官方解释
    @Resource 注解的使用
    扫地机器人会否抛弃激光雷达这位原配?
    女教授领军打造最耐用机器人,可从180米高空落下执行救援任务
    一文看懂80年“AI革命”简史
  • 原文地址:https://www.cnblogs.com/weifeng1463/p/13201789.html
Copyright © 2011-2022 走看看