From 09521d69491619ef1e5e508b643021b5d1aa2839 Mon Sep 17 00:00:00 2001 From: jason5ng32 Date: Mon, 18 Dec 2023 13:31:03 +0800 Subject: [PATCH] Bug fixed --- public/res/app.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/res/app.js b/public/res/app.js index 6c90a779..93927699 100644 --- a/public/res/app.js +++ b/public/res/app.js @@ -464,10 +464,7 @@ new Vue({ if (event.candidate) { candidateReceived = true; const candidate = event.candidate.candidate; - const ipMatch = - /(\b(?:[0-9a-f]{1,4}:){7}[0-9a-f]{1,4}\b)|([0-9]{1,3}(\.[0-9]{1,3}){3})/i.exec( - candidate - ); + const ipMatch = /([0-9a-f]{1,4}(:[0-9a-f]{1,4}){7}|[0-9a-f]{0,4}(:[0-9a-f]{1,4}){0,6}::[0-9a-f]{0,4}|::[0-9a-f]{1,4}(:[0-9a-f]{1,4}){0,6}|[0-9]{1,3}(\.[0-9]{1,3}){3})/i.exec(candidate); if (ipMatch) { stun.ip = ipMatch[0]; pc.close();