automated localhost detection 3