Closed randunel closed 8 years ago
Interested in this as well. Why did you close the issue? :)
socket.remoteAddress
for the client's IP and socket.address().address
for the server's IP?
@ciokan I was interested which local ip address was used when bound to 0.0.0.0
, but I realized it's not a question for this project. socksv5
uses nodejs sockets and my question is not this project's responsibility, it's a nodejs/sockets question really.
@mscdex socket.address().address
returns the bound ip address, according to the documentation. My server has N interfaces, and I'm routing packets based on some complex rules, hence I needed to know which of the interfaces the requests are coming in through.
client -> socks (172.0.0.1) -> destination.example.com
Is there a way to find out which address the client used to connect to the socks server (172.0.0.1)? Or which of the server's IP addresses the connection was made to, when more are available?