, ( -):
req.connection.remoteAddress
req.connection.remotePort
req.connection.localAddress
req.connection.localPort
node.js net.js: https://github.com/nodejs/node/blob/863952ebadd4909a66bb9da7868bf75bbbe1462d/lib/net.js#L608
. , . .
, , .. , , , IP-, , IP- - HTTP ( IP, , - -), TCP- .
, -, HTTP:
X-Forwarded-For - The IP address of the client before it went through the proxy
X-Forwarded-Port - The port of the client before it went through the proxy
X-Forwarded , , , :
X-Forwarded-For: OriginatingClientIPAddress, proxy1-IPAddress, proxy2-IPAddress
RFC 7239 2014:
Forwarded: for=192.0.2.60; proto=http; by=203.0.113.43