add local connection detection