NiceLeeのBlog 用爱发电 bilibili~

知识库 透明代理、匿名代理、混淆代理、高匿代理 [转]

2019-01-10
nIceLee

阅读:


透明代理、匿名代理、混淆代理、高匿代理这4种代理,主要是在代理服务器端的配置不同,导致其向目标地址发送请求时,REMOTE_ADDRHTTP_VIAHTTP_X_FORWARDED_FOR三个变量不同。

透明代理(Transparent Proxy)

  • REMOTE_ADDR = Proxy IP
  • HTTP_VIA = Proxy IP
  • HTTP_X_FORWARDED_FOR = Your IP

透明代理虽然可以直接“隐藏”你的IP地址,但是还是可以从HTTP_X_FORWARDED_FOR来查到你是谁。

匿名代理(Anonymous Proxy)

  • REMOTE_ADDR = Proxy IP
  • HTTP_VIA = Proxy IP
  • HTTP_X_FORWARDED_FOR = Proxy IP

匿名代理比透明代理进步了一点:别人只能知道你用了代理,无法知道你是谁。

混淆代理(Distorting Proxies)

  • REMOTE_ADDR = Proxy IP
  • HTTP_VIA = Proxy IP
  • HTTP_X_FORWARDED_FOR = Random IP address

如上,与匿名代理相同,如果使用了混淆代理,别人还是能知道你在用代理,但是会得到一个假的IP地址,伪装的更逼真:-)

高匿代理(Elite proxy/High Anonymity Proxy)

  • REMOTE_ADDR = Proxy IP
  • HTTP_VIA = not determined
  • HTTP_X_FORWARDED_FOR = not determined

以看出来,高匿代理让别人根本无法发现你是在用代理,所以是最好的选择

分析与总结

以上只是大致的分类,实际服务器配置可能有些差距,具体判断依据还是能否识别客户端真实IP、能否识别使用了代理。
以下有几个请求header供参考(本机客户端ip已用123.123.123.123代替):

  • 未使用代理:
    {
      "x-real-ip": "123.123.123.123",
      "referer": "http://xxx.com/xxx",
      "accept-language": "zh-CN,zh;q=0.8",
      "host": "xxx.com",
      "x-requested-with": "XMLHttpRequest",
      "connection": "close",
      "x-forwarded-for": "123.123.123.123",
      "accept-encoding": "gzip, deflate, sdch",
      "accept": "application/json, text/javascript, */*; q=0.01",
      "user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 SE 2.X MetaSr 1.0"
    }
    
  • 使用透明代理:
    {
      "referer": "http://xxx.com/xxx",
      "accept-language": "zh-CN,zh;q=0.8",
      "x-forwarded-for": "123.123.123.123, 113.200.214.164",
      "accept": "application/json, text/javascript, */*; q=0.01",
      "via": "1.1 ::ffff:113.200.214.164 (Mikrotik HttpProxy)",
      "x-real-ip": "113.200.214.164",
      "x-proxy-id": "1846178648",
      "host": "xxx.com",
      "x-requested-with": "XMLHttpRequest",
      "connection": "close",
      "accept-encoding": "gzip, deflate, sdch",
      "user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 SE 2.X MetaSr 1.0"
    }
    
  • 使用匿名代理:
    {
      "x-real-ip": "120.236.168.19",
      "referer": "http://xxx.com/xxx",
      "accept-language": "zh-CN,zh;q=0.8",
      "proxy-connection": "keep-alive",
      "host": "xxx.com",
      "x-requested-with": "XMLHttpRequest",
      "connection": "close",
      "x-forwarded-for": "120.236.168.19",
      "accept": "application/json, text/javascript, */*; q=0.01",
      "user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 SE 2.X MetaSr 1.0"
    }
    

转载来源

https://blog.csdn.net/a19860903/article/details/47146715


相似文章

内容
隐藏