简体   繁体   中英

Get local IP address (192.168.X.X) in Silverlight from a public website

I am looking to get the local IP address (pre-proxy) by using a public web site address "www.xxx.com". I am in other words NOT after the proxy IP address that you typically get from something like http://www.whatsmyip.org/

How would I go about and do this in Silverlight? Is this even possible? What I am after is identify if a machines is being used within the same LAN as the public server hosting the website. And if so, identify it and send some stuff over a REST API.

What would you do with an address like that? 192.168.xx belongs to a private IP network that isn't routable and it is shared by users all over the world.

You won't know if you are on the LAN by checking the local IP address. Lots of LAN's use 192.168.xx -- that doesn't mean they are on your LAN.

I think that you do want the proxy IP. Either it will be 192.168.xx -- which means that it was on your LAN and routed internally, or it will be the in the subnet of your web's public IP (or at least one that you control). It depends on how you route the IP internally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM