/home/pomelo/livegame/game-server/node_modules/pomelo/lib/connectors
找到
var Socket = function(id, socket) {
//ws模式,过滤IPV4前面的无用IPV6头
var ip = socket._socket.remoteAddress.replace(/::ffff:/, '');
var realIp = socket.upgradeReq.headers['x-forwarded-for'] || socket.upgradeReq.headers['x-real-ip'] || ip
this.remoteAddress = {
ip: ip,
port: socket._socket.remotePort,
realIp: realIp
};