KenDB3 / syncWXremix

Weather application/external program (door) written in javascript for Synchronet BBS
ISC License
9 stars 7 forks source link

Find & use WebSocket client IP address #3

Closed echicken closed 8 years ago

echicken commented 8 years ago

The new 'exec/websocket-telnet-service.js' in the Synchronet CVS can report the client's ipv4 address to the telnet server upon request. If the user is on the local/private network and they are on via telnet, we can first try to retrieve their IP address that way; if that fails we can use 'resolve_ip(system.inet_addr)'.

Users on via RLogin from the local/private network may also be WebSocket clients, and if so (and if the system is using my new web UI) we can fetch the user's real IP address from their web session store. (Again, if that fails we can use 'resolve_ip(system.inet_addr)').

Or if the user is from the local network and a non-IP fallback has been chosen, we'll just use that instead. Likewise if the user isn't from the local network, just use their reported IP address as before.

KenDB3 commented 8 years ago

This is stellar! I love it. I'll merge it in.