HTTP代理:透明代理、普通匿名代理、高度匿名代理、混淆代理的定义和区分

     0评论

HTTP代理按匿名性分类,通常有透明代理、普通匿名代理、高度匿名代理、混淆代理这几种,本文从HTTP HEADER的角度定义、区分这几类代理。

最近研究如何获取客户端的真实IP,关注到了几个相关的HTTP HEADER字段,搜索中文资料发现文末链接的几篇文章写的不错,于是简单整理发布备份。本文基本是转载+整理。

定义

从隐藏使用代理用户的级别上划分,代理可以分为三种,即高度匿名代理、普通匿名代理和透明代理。

(1)高度匿名代理不改变客户机的请求。这样在服务器看来就像有个真正的客户浏览器在访问它,这时客户的真实IP是隐藏的,服务器端不会认为我们使用了代理。

(2)普通匿名代理能隐藏客户机的真实IP,但会改变我们的请求信息,服务器端有可能会认为我们使用了代理。不过使用此种代理时,虽然被访问的网站不能知道你的ip地址,但仍然可以知道你在使用代理,当然某些能够侦测ip的网页仍然可以查到你的ip。

(3)透明代理,它不但改变了我们的请求信息,还会传送真实的IP地址。

三者隐藏使用代理者身份的级别依次为高度匿名代理最隐蔽,其次是普通匿名代理,最差的是透明代理。

英文释义

You may see references to four different types of proxy servers:

Transparent Proxy – This type of proxy server identifiesitself as a proxy server and also makes the original IP addressavailable through the http headers. These are generally used fortheir ability to cache websites and do not effectively provide anyanonymity to those who use them. However, the use of a transparentproxy will get you around simple IP bans. They are transparent inthe terms that your IP address is exposed, not transparent in theterms that you do not know that you are using it (your system isnot specifically configured to use it.)

Anonymous Proxy – This type of proxy server identifiesitself as a proxy server, but does not make the original IP addressavailable. This type of proxy server is detectable, but providesreasonable anonymity for most users.

Distorting Proxy – This type of proxy server identifiesitself as a proxy server, but make an incorrect original IP addressavailable through the http headers.

High Anonymity Proxy – This type of proxy server doesnot identify itself as a proxy server and does not make availablethe original IP address.

HTTP HEADER研究

什么是proxy judges

下面会提到proxy judges,所以此处简单介绍。

A Proxy Judge is a script that is hosted online that outputs visitor’s information that was sent to that server. The main purpose of such script is to check and validate proxy servers. The way most proxy checkers test and validate proxies, is by making a proxy connect to a proxy judge and parsing its output to determine what kind of information that particular proxy reveals, and then derive its level of anonymity, performance metrics, and other features from that information.

Without a proxy judge, a successful connection made to some random website through a proxy would only tell us that the proxy server “works”, but it doesn’t tell us much else such as the additional information sent with each request and the level of anonymity that that particular proxy provides.

HEADER字段释义

您通过代理服务器访问一个 proxy judges 网址后,返回的信息可能包含下面的字段:

REMOTE_HOST=218.145.25.80 REMOTE_ADDR=218.145.25.80 HTTP_ACCEPT=*/* HTTP_ACCEPT_LANGUAGE=en,zh-cn;q=0.5 via - HTTP_CACHE_CONTROL=max-stale=0 HTTP_HOST=61.121.100.107 HTTP_PRAGMA=no-cache HTTP_REFERER=http://www.123cha.com/bbs/viewthread.php?tid=890 HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)

对其中几个字段的简单解释:

REMOTE_HOST – 远端连接方的名称,若是IP地址,就是说 “I have no idea because DNS lookup failure.”

HTTP_ACCEPT_LANGUAGE – 您浏览器所使用的语言集

via: 若不为空,就是说 “Via a Proxy”,”Proxy servers valuable is detected.”

HTTP_HOST – HTTP服务器名称

HTTP_USER_AGENT – 对大多数浏览器而言,这个值一般是 Mozilla。可能还会包括浏览器的类型和版本号以及操作系统信息。

不同代理类型,关键HEADER字段的值不同

我们重点解读有关判定是否使用代理服务器信息的三个字段的含义:

  • REMOTE_ADDR – 访问客户端的 IP 地址
  • HTTP_VIA – 如果有该条信息,就证明您使用了代理服务器,代理服务器的地址就是后面的数值。
  • HTTP_X_FORWARDED_FOR – 如果有该条信息,也证明了您使用了代理服务器代理服务器的地址就是后面的数值。

使用不同种类代理服务器,这三个字段的值会有所不同:

一、没有使用代理服务器的情况:

REMOTE_ADDR = 您的 IP HTTP_VIA = 没数值或不显示 HTTP_X_FORWARDED_FOR = 没数值或不显示

二、使用透明代理服务器的情况:Transparent Proxies

REMOTE_ADDR = 代理服务器 IP HTTP_VIA = 代理服务器 IP HTTP_X_FORWARDED_FOR = 您的真实 IP

这类代理服务器还是将您的信息转发给您的访问对象,无法达到隐藏真实身份的目的。

三、使用普通匿名代理服务器的情况:Anonymous Proxies

REMOTE_ADDR = 代理服务器 IP HTTP_VIA = 代理服务器 IP HTTP_X_FORWARDED_FOR = 代理服务器 IP

隐藏了您的真实IP,但是向访问对象透露了您是使用代理服务器访问他们的。

四、使用欺骗性代理服务器的情况:Distorting Proxies

REMOTE_ADDR = 代理服务器 IP HTTP_VIA = 代理服务器 IP HTTP_X_FORWARDED_FOR = 随机的 IP

告诉了访问对象您使用了代理服务器,但编造了一个虚假的随机IP代替您的真实IP欺骗它。

五、使用高匿名代理服务器的情况:High Anonymity Proxies (Elite proxies)

REMOTE_ADDR = 代理服务器 IP HTTP_VIA = 没数值或不显示 HTTP_X_FORWARDED_FOR = 没数值或不显示

完全用代理服务器的信息替代了您的所有信息,就象您就是完全使用那台代理服务器直接访问对象。

除此之外,proxy judges 还提供了其他可供参考的判定信息,您可以在实践中加以利用。

参考资料

-- EOF --

本文最后修改于5年前 (2019-05-21)

差评不太行一般挺好非常不错 (No Ratings Yet)
读取中...
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址