Google Accounts seem to be able to access that information just by having access to my browser (Chrome):
I assume this can be done through WebRTC. There wasn't any prompt to access my network, but probably hostname can be read without it.
What API that uses?