Closed 5b4wn closed 2 years ago
Thanks for your interest in and nice words about the library.
Currently, this library as well as its twin WebSockets_Generic Library, designed specifically for resource constraint MCUs, don't have that function to help in eliminating spams, attacks, etc using the help of IP filtering.
You can have these options:
ws._socket.remoteAddress
, ws._socket.remotePort
wss.on('connection', (ws, req) =>
{
console.log(req.socket.remoteAddress);
});
I'm sorry I currently have no time to work on this issue and closing it now. If there are many more similar requests,I'll possibly reopen and work on the issue.
Good Luck,
Thanks for a great library
I cant seem to find the following anywhere.
I am using the Teensy41_Server.ino websocket server is it possible to have a method to get the websocket client's IP address please? Or is there any other way to do so?
Eg client.remoteIP() ?
This is useful for IP filtering etc.
Many thanks Marios