Commit dc4fe2d0 authored by Julien Schmidt's avatar Julien Schmidt

always show no-member hint if NAT fails

parent 2dc5a3aa
......@@ -24,7 +24,7 @@
<div id="error-proxy" class="error">You are not a StuStaNet member and did not configure the proxy server. <a href="http://conntest.stustanet.de/nomember">Click here for further information</a>.</div>
<div id="error-blocked" class="error">Your Internet Access is blocked due to malware or malicious behavior. <a href="http://conntest.stustanet.de/blocked">Click here to view the blocking page with more information</a>.</div>
<div id="error-unknown" class="error">An unknown error occurred. Please contact a network administrator and attach the log at the bottom of this page.</div>
<div id="warn-nat" class="warn">Network Address Translation (NAT) is not working, meaning that many application will not work as expected. However, this is expected, as you do not seem to be a StuStaNet member. NAT is a members-only service.<br />You can <a href="https://reg.stustanet.de/">become a member here.</a></div>
<div id="warn-nat" class="warn">Network Address Translation (NAT) is not working, meaning that many application will not work as expected. However, this is expected if you are not a StuStaNet member as NAT is a members-only service.<br />You can <a href="https://reg.stustanet.de/">become a member here.</a></div>
<div id="status">Initializing...</div>
<table id="tests">
<thead>
......
......@@ -7,8 +7,6 @@ const iceServer = "stun:conntest.stustanet.de:3478";
const timeout = 10000; // 10s
let noMember = false;
function isIncompatibleBrowser() {
let ua = window.navigator.userAgent;
let isIE = /msie\s|trident\/|edge\//i.test(ua) &&
......@@ -82,7 +80,6 @@ function checkStatus(url) {
reject("BLOCKED");
return;
case "NOMEMBER":
noMember = true;
showBox('error-proxy');
reject("NOPROXY");
return;
......@@ -202,11 +199,7 @@ function checkNAT() {
ice().then(function(candidate) {
if (candidate === null) {
log("ICE failed. WebRTC might be disabled or not supported.");
if (noMember) {
showBox('warn-nat');
} else {
showUnknown();
}
showBox('warn-nat');
reject('FAIL')
} else {
log("Detected External IP: " + candidate.address);
......@@ -220,11 +213,7 @@ function checkNAT() {
}
}).catch(function(error) {
log("Error: " + error);
if (noMember) {
showBox('warn-nat');
} else {
showUnknown();
}
showBox('warn-nat');
reject(error);
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment