浏览器IP地址
我有2个应用程序
1 Ruby(不是我写的.我对Ruby一无所知)和另一个ASP.Net
1 Ruby (not written by me. I understand nothing of Ruby) and the other ASP.Net
Ruby应用程序确定用户的IP地址(被告知使用在"HTTP_X_FORWARDED"中找到的第一个IP),并将其哈希版本传递给ASP.Net应用程序.
The Ruby app determines the users's IP address (I'm told "using first IP found in "HTTP_X_FORWARDED" )and passes a hashed version of it to the ASP.Net app.
然后,ASP.Net应用程序再次(使用Request.UserHostAddress)确定客户端的IP地址并对该值进行哈希处理.
The ASP.Net app then determines the Client's IP address again (using Request.UserHostAddress) and hashes the value.
然后比较散列.
通常,对于我们所有的客户来说,这些哈希都是相同的.
Generally these hashes are identical ( as you might expect) for all our clients.
但是我们有1个新客户,但事实并非如此...
However we have 1 new client for which this is not the case...
工作场所中的每台计算机显然产生的哈希值都不相等
Every computer at his workplace apparently produces hashes which are not equal
怎么可能?
这取决于他们要通过的代理.
It depends on the proxy they're going through.
X-Forwarded-For标头的维基百科页面内容丰富在这方面.
如果要使散列匹配,则应从相同的标头中获取数据. UserHostAddress
由REMOTE_ADDR确定服务器变量(我相信).
If you want the hashes to match, you should get the data from the same header. UserHostAddress
is determined by the REMOTE_ADDR server variable (I believe).