main: add --remote-saving for limiting clients remote session saving rights
This commit is contained in:
parent
a4a2572973
commit
09debb5171
5 changed files with 12 additions and 2 deletions
|
|
@ -6,11 +6,14 @@ var hearbeatInterval = 25000,
|
|||
|
||||
class Socket extends EventEmitter {
|
||||
|
||||
constructor(ws, id) {
|
||||
constructor(ws, id, address) {
|
||||
|
||||
super()
|
||||
|
||||
this.id = id
|
||||
|
||||
this.address = address.indexOf('::ffff:') === 0 ? address.replace('::ffff:', '') : address
|
||||
|
||||
this.socket = null
|
||||
|
||||
this.sessionPath = ''
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class Ipc extends EventEmitter {
|
|||
|
||||
if (!this.clients[id]) {
|
||||
|
||||
var client = new Client(socket, id)
|
||||
var client = new Client(socket, id, req.connection.remoteAddress)
|
||||
this.clients[id] = client
|
||||
|
||||
this.emit('connection', client)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue