将节点分为普通节点和控制节点
This commit is contained in:
@@ -27,7 +27,7 @@ func (l *serverListen) Lisen() {
|
||||
|
||||
if l.isSocks5 {
|
||||
conn.id = l.id
|
||||
l.node.Write(common.CMD_CONNECT_BYIDADDR_RESULT, l.replayid, l.socks5Replay)
|
||||
l.node.Write(common.CMD_CONNECT_BYIDADDR_RESULT, l.replayid, append(l.randkey,l.socks5Replay...))
|
||||
go conn.handTcpReceive()
|
||||
return
|
||||
}
|
||||
@@ -38,7 +38,7 @@ func (l *serverListen) Lisen() {
|
||||
b[1] = byte(conn.id >> 8)
|
||||
b[2] = byte(conn.id >> 16)
|
||||
b[3] = byte(conn.id >> 24)
|
||||
conn.node.Write(common.CMD_CONNECT_BYID, l.id, b)
|
||||
conn.node.Write(common.CMD_CONNECT_BYID, l.id, append(l.randkey,b...))
|
||||
l.connMap.Store(conn.id, conn)
|
||||
go conn.handTcpReceive()
|
||||
|
||||
@@ -58,7 +58,7 @@ func (l *serverListen) Close(reason string) {
|
||||
})
|
||||
if reason != remoteClose {
|
||||
|
||||
l.node.Write(common.CMD_DELETE_LISTEN, l.id, nil)
|
||||
l.node.Write(common.CMD_DELETE_LISTEN, l.id, l.randkey)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user