socket io is available on the server. But I can't use a foreign machine in the same LAN. But if I turn off the firewall, it can work. So I created a firewall rule to allow port 3000, but it hasn't yet.
const io = new Server(httpServer, { cors: { origin: 'http://192.168.2.38', methods: ['GET', 'POST'], credentials: true, }, });
httpServer.listen(3000, () => {
console.log('Server is running on port 3000');
});
const socket = socketIoClient('http://192.168.2.38:3000', {
withCredentials: true,
transports: ['websocket'],
});
access through the IP address of the server at port 80.
I want to be able to use socket io from external machines in the same LAN even with the firewall turned off.