跳转至

使用curl 测试代理Link

1、HTTP 代理Link

爬虫代理Link

    #!/bin/bash
    curl -x http://username:password@ip:port http://current.ip.16yun.cn:802 

爬虫代理(IP隧道,保持IP不变)Link

用户可以指定IP隧道,用于连续请求场景

    #!/bin/bash
    curl -H "Proxy-Tunnel: 12345" -v -x http://username:password@ip:port http://current.ip.16yun.cn:802

自定义隧道

可以在请求头中加入 Proxy-Tunnel: 数值*随机数值*, 不同的数值表示不同的隧道;在代理有效期内,当数值相同,使用的代理IP就相同

API代理Link

    #!/bin/bash
    curl -x http://ip:port http://current.ip.16yun.cn:802
  • ip 代理IP
  • port 端口

2、Socks5 代理Link

用户密码认证模式Link

    #!/bin/bash
    curl -x socks5h://username:password@ip:port http://current.ip.16yun.cn:802

IP认证模式Link

    #!/bin/bash
    curl -x socks5h://ip:port http://current.ip.16yun.cn:802
  • username 用户名
  • password 密码
  • ip 代理IP
  • port 端口