将节点分为普通节点和控制节点

This commit is contained in:
Mob2003
2023-03-31 11:58:47 +08:00
parent 88e128f941
commit 3b9a9cf4e1
28 changed files with 644 additions and 236 deletions
+3 -3
View File
@@ -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)
}
}
}