浏览器IP地址 [英] Browser IP Address

查看:63
本文介绍了浏览器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).

这篇关于浏览器IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆