diff options
-rw-r--r-- | package-lock.json | 44 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/components/AdminSettings/TurnServer.vue | 40 |
3 files changed, 50 insertions, 36 deletions
diff --git a/package-lock.json b/package-lock.json index d99b46757..f80149062 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5614,24 +5614,24 @@ } }, "@webpack-cli/configtest": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.0.tgz", - "integrity": "sha512-Un0SdBoN1h4ACnIO7EiCjWuyhNI0Jl96JC+63q6xi4HDUYRZn8Auluea9D+v9NWKc5J4sICVEltdBaVjLX39xw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.1.tgz", + "integrity": "sha512-B+4uBUYhpzDXmwuo3V9yBH6cISwxEI4J+NO5ggDaGEEHb0osY/R7MzeKc0bHURXQuZjMM4qD+bSJCKIuI3eNBQ==", "dev": true }, "@webpack-cli/info": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.2.1.tgz", - "integrity": "sha512-fLnDML5HZ5AEKzHul8xLAksoKN2cibu6MgonkUj8R9V7bbeVRkd1XbGEGWrAUNYHbX1jcqCsDEpBviE5StPMzQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.2.2.tgz", + "integrity": "sha512-5U9kUJHnwU+FhKH4PWGZuBC1hTEPYyxGSL5jjoBI96Gx8qcYJGOikpiIpFoTq8mmgX3im2zAo2wanv/alD74KQ==", "dev": true, "requires": { "envinfo": "^7.7.3" } }, "@webpack-cli/serve": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.2.2.tgz", - "integrity": "sha512-03GkWxcgFfm8+WIwcsqJb9agrSDNDDoxaNnexPnCCexP5SCE4IgFd9lNpSy+K2nFqVMpgTFw6SwbmVAVTndVew==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.3.0.tgz", + "integrity": "sha512-k2p2VrONcYVX1wRRrf0f3X2VGltLWcv+JzXRBDmvCxGlCeESx4OXw91TsWeKOkp784uNoVQo313vxJFHXPPwfw==", "dev": true }, "@xtuc/ieee754": { @@ -9638,9 +9638,9 @@ "dev": true }, "envinfo": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.7.3.tgz", - "integrity": "sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.7.4.tgz", + "integrity": "sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ==", "dev": true }, "errno": { @@ -21864,17 +21864,17 @@ } }, "webpack-cli": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.4.0.tgz", - "integrity": "sha512-/Qh07CXfXEkMu5S8wEpjuaw2Zj/CC0hf/qbTDp6N8N7JjdGuaOjZ7kttz+zhuJO/J5m7alQEhNk9lsc4rC6xgQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.5.0.tgz", + "integrity": "sha512-wXg/ef6Ibstl2f50mnkcHblRPN/P9J4Nlod5Hg9HGFgSeF8rsqDGHJeVe4aR26q9l62TUJi6vmvC2Qz96YJw1Q==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.0.0", - "@webpack-cli/info": "^1.2.1", - "@webpack-cli/serve": "^1.2.2", + "@webpack-cli/configtest": "^1.0.1", + "@webpack-cli/info": "^1.2.2", + "@webpack-cli/serve": "^1.3.0", "colorette": "^1.2.1", - "commander": "^6.2.0", + "commander": "^7.0.0", "enquirer": "^2.3.6", "execa": "^5.0.0", "fastest-levenshtein": "^1.0.12", @@ -21886,9 +21886,9 @@ }, "dependencies": { "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.0.0.tgz", + "integrity": "sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA==", "dev": true }, "cross-spawn": { diff --git a/package.json b/package.json index 2ca665b7c..ec571a125 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "vue-loader": "^15.9.6", "vue-template-compiler": "^2.6.12", "webpack": "^4.46.0", - "webpack-cli": "^4.4.0", + "webpack-cli": "^4.5.0", "webpack-merge": "^5.7.3", "webpack-node-externals": "^2.5.2" }, diff --git a/src/components/AdminSettings/TurnServer.vue b/src/components/AdminSettings/TurnServer.vue index 916fbfa52..357f7a5a0 100644 --- a/src/components/AdminSettings/TurnServer.vue +++ b/src/components/AdminSettings/TurnServer.vue @@ -133,7 +133,8 @@ export default { data() { return { testing: false, - testingError: false, + testingErrorUDP: false, + testingErrorTCP: false, testingSuccess: false, } }, @@ -153,17 +154,23 @@ export default { }, testIconClasses() { return { - 'icon-category-monitoring': !this.testing && !this.testingError && !this.testingSuccess, + 'icon-category-monitoring': !this.testing && !(this.testingErrorUDP || this.testingErrorTCP) && !this.testingSuccess, 'icon-loading-small': this.testing, - 'icon-error': this.testingError, + 'icon-error': this.testingErrorUDP || this.testingErrorTCP, 'icon-checkmark': this.testingSuccess, } }, testResult() { if (this.testingSuccess) { return t('spreed', 'OK: Successful ICE candidates returned by the TURN server') - } else if (this.testingError) { - return t('spreed', 'Error: No working ICE candidates returned by the TURN server') + } else if (this.testingErrorUDP) { + if (this.testingErrorTCP) { + return t('spreed', 'Error: No working ICE candidates returned by the TURN server') + } + + return t('spreed', 'Error: No working ICE candidates returned for UDP by the TURN server') + } else if (this.testingErrorTCP) { + return t('spreed', 'Error: No working ICE candidates returned for TCP by the TURN server') } else if (this.testing) { return t('spreed', 'Testing whether the TURN server returns ICE candidates') } @@ -173,7 +180,8 @@ export default { mounted() { this.testing = false - this.testingError = false + this.testingErrorUDP = false + this.testingErrorTCP = false this.testingSuccess = false }, @@ -184,7 +192,8 @@ export default { testServer() { this.testing = true - this.testingError = false + this.testingErrorUDP = false + this.testingErrorTCP = false this.testingSuccess = false const schemes = this.schemes.split(',') @@ -256,17 +265,22 @@ export default { notifyTurnResult(candidates, timeout) { console.info('Received candidates', candidates) - const types = candidates.map((cand) => cand.type) + const udpCandidates = candidates.filter((cand) => cand.type === 'relay' && cand.protocol === 'UDP') + const tcpCandidates = candidates.filter((cand) => cand.type === 'relay' && cand.protocol === 'TCP') this.testing = false - if (types.indexOf('relay') === -1) { - this.testingError = true - } else { - this.testingSuccess = true + if (udpCandidates.length === 0 && this.protocols.indexOf('udp') !== -1) { + this.testingErrorUDP = true } + if (tcpCandidates.length === 0 && this.protocols.indexOf('tcp') !== -1) { + this.testingErrorTCP = true + } + + this.testingSuccess = !(this.testingErrorUDP || this.testingErrorTCP) setTimeout(() => { - this.testingError = false + this.testingErrorUDP = false + this.testingErrorTCP = false this.testingSuccess = false }, 30000) |