Thank you for the quick reply, @eskimo! I did stumble upon you amazing FAQ while researching a fix for the issue, but I failed to find the thread you sent. That thread does state that test runners can't access the local network.
For the sake of helping out anyone that might also face this in the future, since my goal was purely around logging, I got around that by hosting a tiny websocket server with 1-1 connections. The test runner can use that since that's hosted on a remote server.