automated localhost detection 2