即使使用代理/VPN,如何获取客户端 IP?
如何从注册表中的用户获取客户端IP?用户无需使用代理、Proxycacade 或 VPN 即可轻松获取 IP。但如果他使用其中之一,那就很困难了。 X-Fowarded-For 不可靠并且会在级联中失败。
但还是有可能性的,因为 JavaApplet 和 Flash 不使用代理服务。我怎样才能通过这些技术获得客户端IP?我不愿意使用一个小的Flash-Code从客户端获取IP,但是如何实现呢? 另一种方法应该是使用 IPv6 的反像素。大多数代理服务仅支持 IPv4,我可以告诉图像仅使用 IPv6 吗?
也许有更好的解决方案可以解决我的问题,所以我期待您的建议。干杯。
How do I get the clientIP from users in my regisrtationforms? It's easy to get the IP with the user isn't using a Proxy, Proxycacade or VPN. But if he uses one of those its difficult. X-Fowarded-For isn't reliable and fails within cascads.
But there are possibilities, because JavaApplets and Flash aren't using the Proxy-Services. How can I archieve to get the clientIP with those technics? I prever to use a small Flash-Code to get the IP from the client, but how to implement?
Another way should be a counterpixel which is using IPv6. Most of the proxyservices only support IPv4, can I tell an image only to use IPv6?
Maybe there are better solutions for my problem, so I look forward to you suggestions. Cheers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么要知道客户端的IP地址?如果他们隐藏它,那么这可能不关你的事。
如果你想用它来限制连接数、投票数等,那就再想想了。 IPv4地址即将耗尽,一个IPv4地址将被多个用户使用,甚至ISP与用户之间的IPv4地址与用户网络内部的IPv4地址也会重叠。您将越来越多地看到以下情况:您从“正常”IPv4 地址(例如 192.0.2.42)获得连接。这将是一个 NAT 盒,内部地址为 10.0.0.0/8。在这些地址之一上,用户将连接一个 NAT 盒,将其 NAT 到 192.168.1.0/24。 192.0.2.42、10.0.0.0/8 中的地址和 192.168.1.0/24 中的地址都无法识别用户。
使用 IPv6,用户几乎可以拥有无限数量的 IP 地址。 IPv6 地址只能用于查看连接来自哪个 /64 网络,但不能用于跟踪用户或设备。
赋予 IP 地址意义是没有意义的,除非您可以去执法部门并获取所有涉及的盒子的 NAT 日志......
Why do you want to know the IP address of the client? If they hide it then it's probably none of your business.
If you want to use it for limiting the number of connections, votes, etc. then think again. IPv4 addresses are running out so one IPv4 address will be used by many users, and even the IPv4 addresses between the ISP and the user and the IPv4 addresses inside a user's network will overlap. You will see the following situation more and more: You get a connection from a 'normal' IPv4 address, say 192.0.2.42. That will be a NAT box with i.e. 10.0.0.0/8 on the inside. On one of those addresses the user will connect a NAT box which NATs it to 192.168.1.0/24. Neither 192.0.2.42, the address in 10.0.0.0/8 nor the address in 192.168.1.0/24 will identify a user.
With IPv6 a user has an almost unlimited amount of IP addresses. An IPv6 address can only be used to see which /64 network the connection comes from, but not for tracking users or devices.
Giving meaning to IP addresses is pointless, unless you can go to law enforcement and get the NAT logs of all boxes involved...