Discovering the User's Hostname

5

I have an application running with AngularJS where I need to know the name of the machine (of the user) that is accessing the application. Has anyone ever had to do this with javascript?

  

Note: The front end is outside my local network

    
asked by anonymous 19.12.2016 / 19:34

1 answer

4

TL; DR : Not possible.

Long Version : For security reasons (environment isolation), none of the objects provided by current ECMAScript implementations include information about the environment itself - only those historically inherited, such as OS version and platform (via window.navigator ).

Technologies such as reverse DNS can be used if the receiving server has a direct connection to the client (without gateways, VPNs or intermediate NATs, for example).

    
20.12.2016 / 07:15