rewrite local peer discovery