mirror of
https://github.com/aljazceru/gitpear.git
synced 2025-12-17 14:14:22 +01:00
@@ -17,6 +17,8 @@ module.exports = class RPC {
|
|||||||
if (this.connections[peerInfo.publicKey]) return this.connections[peerInfo.publicKey]
|
if (this.connections[peerInfo.publicKey]) return this.connections[peerInfo.publicKey]
|
||||||
|
|
||||||
const rpc = new ProtomuxRPC(socket)
|
const rpc = new ProtomuxRPC(socket)
|
||||||
|
rpc.on('error', err => console.error('rpc error', err))
|
||||||
|
rpc.on('close', () => delete this.connections[peerInfo.publicKey])
|
||||||
// XXX: handshaking can be used for access and permission management
|
// XXX: handshaking can be used for access and permission management
|
||||||
// for example check of peerInfo.publicKey is in a list of allowed keys
|
// for example check of peerInfo.publicKey is in a list of allowed keys
|
||||||
// which can in turn be stored in a .git-daemon-export-ok file
|
// which can in turn be stored in a .git-daemon-export-ok file
|
||||||
|
|||||||
Reference in New Issue
Block a user