更新依赖&版本号(2.6.0-beta.5)

This commit is contained in:
lyswhut
2023-12-12 14:00:22 +08:00
parent e9539b5c5c
commit 050b641d79
21 changed files with 335 additions and 334 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ const verifyConnection = (encryptMsg: string, userId: string) => {
export const authConnect = async(req: http.IncomingMessage) => {
let ip = getAvailableIP(req)
if (ip) {
const query = querystring.parse((req.url as string).split('?')[1])
const query = querystring.parse((req.url!).split('?')[1])
const i = query.i
const t = query.t
if (typeof i == 'string' && typeof t == 'string' && verifyConnection(t, i)) return
@@ -56,7 +56,7 @@ const checkDuplicateClient = (newSocket: LX.Sync.Server.Socket) => {
}
const handleConnection = async(socket: LX.Sync.Server.Socket, request: IncomingMessage) => {
const queryData = new URL(request.url as string, host).searchParams
const queryData = new URL(request.url!, host).searchParams
const clientId = queryData.get('i')
// // if (typeof socket.handshake.query.i != 'string') return socket.disconnect(true)
@@ -232,7 +232,7 @@ const handleStartServer = async(port = 9527, ip = '0.0.0.0') => await new Promis
// events = {}
if (!status.devices.length) handleUnconnection()
} else {
const queryData = new URL(request.url as string, host).searchParams
const queryData = new URL(request.url!, host).searchParams
log.info('deconnection', queryData.get('i'))
}
})
@@ -301,7 +301,7 @@ const handleStartServer = async(port = 9527, ip = '0.0.0.0') => await new Promis
const bind = typeof addr == 'string' ? `pipe ${addr}` : `port ${addr.port}`
log.info(`Listening on ${ip} ${bind}`)
resolve(null)
void registerLocalSyncEvent(wss as LX.Sync.Server.SocketServer)
void registerLocalSyncEvent(wss!)
})
host = `http://${ip}:${port}`