VPN Client Gateway Management
VPN Changed
Remember to restart media apps!
Changing VPN
This may take a few moments...
IP Geolocation
Country Name
Canada
Country Code
CA
Region Name
Montreal Area
Region Code
QC
City
Montreal
Public IP
10.1.2.114
Close
Disable VPN
Disabling VPN service. Network traffic will be forwarded via your normal ISP internet connection.
Enable VPN
Enabling VPN service. Network traffic will be forwarded via your VPN connection.
Disable VPN
Disabling VPN service. Network traffic will be forwarded via your normal ISP internet connection.
Reboot VPN Client Gateway
Rebooting will take approximately 90 seconds. All sessions will be terminated.
Shutdown VPN Client Gateway
Proceed with shutting down the VPN Client Gateway server? All network sessions will be terminated.
Current VPN server:
requesting data...
Gateway status:
openvpn service status icon
VPN service:
CPU load:
%
openvpn service state icon
VPN state:
%
dns status icon
DNS queries:
CPU temp:
°C
internet status icon
Internet:
Choose new VPN server:
requesting data...
================================================
FILE: www/scripts/main.js
================================================
var ignoreUpdatesTime;
var socketioNamespace = '/vpncgw';
var socket = io(socketioNamespace);
// Event handlers for server sent data
socket.on('serverchange', (data) => serverChangeNotification(data));
socket.on('vpncgwstatus', (data) => statusUpdate(data));
socket.on('currentserver', (data) => populateCurrentServer(data));
socket.on('serverlist', (data) => populateServerList(data));
socket.on('iplocation', (data) => populateIPGeolocation(data));
socket.on('traceroute', (data) => populateTraceroute(data));
socket.on('syslog', (data) => populateSyslog(data));
socket.on('speedtest', (data) => populateSpeedtest(data));
function populateTraceroute(data) {
var tracerouteInfoContainer = document.getElementById("TracerouteInfoContainer");
var tracerouteData = document.getElementById("tracerouteData");
e = document.createElement('pre');
e.setAttribute('id','tracerouteData');
e.innerHTML = data;
tracerouteInfoContainer.appendChild(e);
tracerouteInfoContainer.classList.remove("showLoadingIcon");
}
function show_traceroute() {
show_element("TracerouteOverlay");
var tracerouteInfoContainer = document.getElementById("TracerouteInfoContainer");
tracerouteInfoContainer.classList.add("showLoadingIcon");
delete_all_children(tracerouteInfoContainer);
socket.emit('gettraceroute');
}
function populateServerList(data) {
if (data['servergroup'] == 'basic'){
populateBasicServers(data['serverlist']);
}
else{
populateAdvancedServers(data['serverlist']);
}
}
function serverChangeNotification(data) {
clearStatus();
get_current_vpn_server();
}
function setIcon(elementId,iconName) {
ele = document.getElementById(elementId);
ele.classList.remove('warnIcon');
ele.classList.remove('okIcon');
ele.classList.remove('disabledIcon');
ele.classList.remove('loadingIcon');
ele.classList.add(iconName);
}
function statusUpdate(status_json) {
if (Date.now() <= ignoreUpdatesTime)
return;
var st = document.getElementsByClassName('StatusTable');
for (i = 0; i < st.length; i++) {
st[i].style.opacity='1';
}
document.getElementById('GatewayStatusOverlay').style.opacity='0';
var vpnserver_cookie_val = getCookie("vpnserver");
var vpnstate_cookie_val = (getCookie("vpnstate") == 'true');
// process status updates sent from server via SocketIO message
var status_data = JSON.parse(status_json);
//console.log(status_data);
var status_string = "";
var gateway_status_ok = true;
var vpn_status_ok = true;
var internet_status_ok = true;
var currentServer = status_data['currentserver']['servername'];
var vpn_enabled = status_data['currentserver']['enabled'];
if ((currentServer != vpnserver_cookie_val) || (vpn_enabled != vpnstate_cookie_val)){
get_current_vpn_server();
}
service_status = status_data['openvpn']['service'];
if (service_status == 'disabled'){
setIcon('openvpnServiceStatusIcon','disabledIcon');
document.getElementById('openvpnServiceStatus').innerText = 'disabled';
setIcon('openvpnServiceStateIcon','disabledIcon');
document.getElementById('openvpnServiceState').innerText = 'n/a';
}
else {
if (service_status != 'active'){
setIcon('openvpnServiceStatusIcon','warnIcon');
setIcon('openvpnServiceStateIcon','disabledIcon');
document.getElementById('openvpnServiceStatus').innerText = 'inactive';
document.getElementById('openvpnServiceState').innerText = 'n/a';
vpn_status_ok = false;
}
else {
setIcon('openvpnServiceStatusIcon','okIcon');
document.getElementById('openvpnServiceStatus').innerText = 'active';
if ('state' in status_data['openvpn']) {
if (status_data['openvpn']['state']['state_name'] != 'CONNECTED'){
setIcon('openvpnServiceStateIcon','warnIcon');
document.getElementById('openvpnServiceState').innerText = 'connecting...';
vpn_status_ok = false;
}
else {
setIcon('openvpnServiceStateIcon','okIcon');
document.getElementById('openvpnServiceState').innerText = 'connected';
}
}
else {
setIcon('openvpnServiceStateIcon','disabledIcon');
document.getElementById('openvpnServiceState').innerText = 'n/a';
}
}
}
if (status_data['system']['dns_ok'] != 'True'){
setIcon('dnsStatusIcon','warnIcon');
document.getElementById('dnsStatus').innerText = 'not responding';
internet_status_ok = false;
}
else {
setIcon('dnsStatusIcon','okIcon');
document.getElementById('dnsStatus').innerText = 'ok';
}
if (status_data['system']['inet_ok'] != 'True')
internet_status_ok = false;
if (internet_status_ok == false) {
setIcon('internetStatusIcon','warnIcon');
document.getElementById('internetStatus').innerText = 'not connected';
}
else {
document.getElementById('internetStatus').innerText = 'connected';
setIcon('internetStatusIcon','okIcon');
}
document.getElementById('memoryUsageValue').innerText = Math.round(status_data['system']['mem_usage'],0);
show_element('memoryUsageValue');
show_element('memoryUsageUnit');
document.getElementById('cpuUsageValue').innerText = Math.round(status_data['system']['cpu_load'],0);
show_element('cpuUsageValue');
show_element('cpuUsageUnit');
document.getElementById('cpuTempValue').innerText = Math.round(status_data['system']['cpu_temp'],0);
show_element('cpuTempValue');
show_element('cpuTempUnit');
}
function clearStatus() {
// ignore update messages for 5 seconds
ignoreUpdatesTime = Date.now() + 5000;
setIcon('internetStatusIcon','loadingIcon');
setIcon('dnsStatusIcon','loadingIcon');
setIcon('openvpnServiceStateIcon','loadingIcon');
setIcon('openvpnServiceStatusIcon','loadingIcon');
document.getElementById('cpuTempValue').innerText = '';
document.getElementById('cpuUsageValue').innerText = '';
document.getElementById('memoryUsageValue').innerText = '';
document.getElementById('internetStatus').innerText = '';
document.getElementById('dnsStatus').innerText = '';
document.getElementById('openvpnServiceState').innerText = '';
document.getElementById('openvpnServiceStatus').innerText = '';
hide_element('cpuUsageUnit');
hide_element('cpuTempUnit');
hide_element('memoryUsageUnit');
var st = document.getElementsByClassName('StatusTable');
for (i = 0; i < st.length; i++) {
st[i].style.opacity='0';
}
document.getElementById('GatewayStatusOverlay').style.opacity='1';
}
// force browser to load stylesheet (instead of using cached version),
// this is used for development purposes and should be removed in a deployed system.
document.getElementById('documentLink').setAttribute('href','/styles/index.css?v=' + Math.random().toString());
function sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
function show_element(ele) {
if (ele instanceof Array)
for (i = 0; i < ele.length; i++)
try {
document.getElementById(ele[i]).style.display = "block";
}
catch(err) {
console.log(err);
}
else if (typeof ele === 'string' || ele instanceof String) {
try {
document.getElementById(ele).style.display = "block";
}
catch(err) {
console.log(err);
}
}
else if (ele instanceof Element){
try {
ele.style.display = "block";
}
catch(err) {
console.log(err);
}
}
}
function hide_element(ele) {
if (ele instanceof Array)
for (i = 0; i < ele.length; i++)
try {
document.getElementById(ele[i]).style.display = "none";
}
catch(err) {
console.log(err);
}
else if (typeof ele === 'string' || ele instanceof String) {
try {
document.getElementById(ele).style.display = "none";
}
catch(err) {
console.log(err);
}
}
else if (ele instanceof Element){
try {
ele.style.display = "none";
}
catch(err) {
console.log(err);
}
}
}
function delete_all_children(ele) {
// deletes all child elements of a node
while (ele.firstChild)
ele.removeChild(ele.firstChild);
}
function show_tools(){
show_element("Tools");
hide_element(["VPNSection","Admin"]);
}
function show_admin(){
show_element("Admin");
hide_element(["Tools","VPNSection"]);
}
function show_changing_vpn_message(){
show_element("ChangingVPNMessageOverlay");
sleep(2000).then(() => {
hide_element("ChangingVPNMessageOverlay");
})
}
function show_vpn_change_message(){
show_element("VPNChangeMessageOverlay");
sleep(2000).then(() => {
hide_element("VPNChangeMessageOverlay");
})
}
function getStatus(){
socket.emit('getvpncgwstatus');
}
function populateCurrentServer(serverinfo) {
try {
var vpnserver_cookie_val = getCookie("vpnserver");
var vpnstate_cookie_val = (getCookie("vpnstate") == 'true');
setCookie("vpnserver",serverinfo["servername"],1);
setCookie("vpnstate",serverinfo["enabled"],1);
headingtext = "Current VPN server:";
if (serverinfo["enabled"] == false){
headingtext += " none. All traffic originates from your ISP.";
hide_element(["CurrentVPNFlag","DisableVPNMenuButton"]);
show_element("EnableVPNMenuButton");
}
else{
var currentVPNFlag = document.getElementById("CurrentVPNFlag");
delete_all_children(currentVPNFlag);
var currentVPNFlagTable = document.createElement("TABLE");
currentVPNFlagTable.setAttribute("id","CurrentVPNFlagTable");
var tb = document.createElement("tbody");
var tr = document.createElement("TR");
var td = document.createElement("TD");
var img = document.createElement("img");
img.setAttribute("id","CurrentVPNFlagImage");
img.setAttribute("src","images/flags/" + serverinfo["flagfile"]);
var location = document.createElement("p");
location.setAttribute("id","ServerLocation");
location.innerHTML = serverinfo["countryname"] + " ";
if (serverinfo["regionname"] != null) location.innerHTML += serverinfo["regionname"];
td.appendChild(img);
td.appendChild(location);
tr.appendChild(td);
tr.appendChild(document.createElement("td"));
tr.appendChild(document.createElement("td"));
tb.appendChild(tr);
currentVPNFlagTable.appendChild(tb);
currentVPNFlag.appendChild(currentVPNFlagTable);
headingtext += " " + serverinfo["servername"];
show_element(["CurrentVPNFlag","DisableVPNMenuButton"]);
hide_element("EnableVPNMenuButton");
}
document.getElementById("CurrentVPNServerHeading").innerHTML = headingtext;
if ((vpnstate_cookie_val != serverinfo['enabled']) || (vpnserver_cookie_val != serverinfo['servername'])) {
show_vpn_change_message();
}
} catch(err){
// something bad happened...
}
}
function get_current_vpn_server() {
socket.emit('getcurrentserver');
}
function set_current_vpn_server_changing(changing_message) {
var currentServerHeading = document.getElementById('CurrentVPNServerHeading');
currentServerHeading.innerText = 'Current VPN server: '.concat(changing_message);
hide_element('CurrentVPNFlag');
}
function change_vpn_server(servername,serverport) {
setCookie("vpnserver",servername,1);
//setCookie("vpnstate",serverinfo["enabled"],1);
show_changing_vpn_message();
set_current_vpn_server_changing('changing server...');
request_data = {"request":"changeserver","servername": servername,"serverport": serverport};
socket.emit('changeserver',request_data);
clearStatus();
return false;
}
function populateIPGeolocation(data) {
function createRow(description,value) {
var tr = document.createElement('TR');
var td = document.createElement('TD');
td.innerText = description;
tr.appendChild(td);
td = document.createElement('TD');
td.innerText = value;
tr.appendChild(td);
return tr;
}
var ipgeo_json = data;
var tableContainer = document.getElementById("IPInfoBoxTableContainer");
var t = document.createElement('TABLE');
t.setAttribute('class','ipinfotable');
t.setAttribute('id','IPLocationTable');
var tb = document.createElement('TBODY');
tb.appendChild(createRow("Country Name", ipgeo_json["geoplugin_countryName"]));
tb.appendChild(createRow("Country Code", ipgeo_json["geoplugin_countryCode"]));
tb.appendChild(createRow("Region Name", ipgeo_json["geoplugin_regionName"]));
tb.appendChild(createRow("Region Code", ipgeo_json["geoplugin_regionCode"]));
tb.appendChild(createRow("City", ipgeo_json["geoplugin_city"]));
tb.appendChild(createRow("Public IP Address", ipgeo_json["geoplugin_request"]));
t.appendChild(tb);
document.getElementById("IPInfoBox").classList.remove("showLoadingIcon");
tableContainer.appendChild(t);
}
function show_iplocationinfo() {
var tableContainer = document.getElementById("IPInfoBoxTableContainer");
document.getElementById("IPInfoBox").classList.add("showLoadingIcon");
delete_all_children(tableContainer);
show_element("IPInfoOverlay");
socket.emit('getiplocation');
}
function hide_iplocationinfo(){
hide_element("IPInfoOverlay");
}
function populateSpeedtest(speedtestData) {
var speedtestText = "";
var e_status = document.getElementById("SpeedtestStatusMessage");
var e_progress = document.getElementById("SpeedtestProgress");
var e_results = document.getElementById("SpeedtestResults");
var e_container = document.getElementById("SpeedtestInfoContainer");
if (speedtestData.hasOwnProperty('progress')){
switch(speedtestData.progress) {
case "getservers":
text = "Getting server list...\n";
break;
case "download":
text = "Testing download speed...\n";
break;
case "upload":
text = "Testing upload speed...";
break;
default:
text = null;
}
if (text != null){
e_progress.innerText += text;
}
}
else if (speedtestData.hasOwnProperty('results')){
e_container.classList.remove("showLoadingIcon");
e_status.innerText = "Speed test results:";
hide_element(e_progress);
delete_all_children(e_results);
e_results.appendChild(speedtestResultsHTML(speedtestData.results));
show_element(e_results);
}
else if (speedtestData.hasOwnProperty('error')){
e_container.classList.remove("showLoadingIcon");
e_status.innerText = "Error:";
e_progress.innerText = speedtestData.error;
}
}
function speedtestResultsHTML(results) {
// create html elements for speedtest results
function bps_to_Mbps(bps) {
return bps / Math.pow(10,6);
}
const MS_PER_MINUTE = 60000;
var resultsList = new Array()
resultsList.push({label : 'Download Mbps', value : bps_to_Mbps(results.download).toFixed(2)});
resultsList.push({label : 'Upload Mbps', value : bps_to_Mbps(results.upload).toFixed(2)});
resultsList.push({label: 'Ping ms', value: (results.ping).toFixed(2)});
resultsList.push({label: 'Host', value: results.server.host});
resultsList.push({label: 'Sponsor', value: results.server.sponsor});
resultsList.push({label: 'Country', value: results.server.country});
resultsList.push({label: 'Timestamp', value: results.timestamp});
var e_resultsTable = document.createElement('div');
resultsList.forEach(function (arrayItem) {
var e_resultRow = document.createElement('div');
e_resultRow.classList.add("speedtestResultRow");
var e_label = document.createElement('div');
e_label.classList.add("speedtestLabelColumn");
e_label.innerText = arrayItem.label;
var e_value = document.createElement('div');
e_value.classList.add("speedtestValueColumn");
e_value.innerText = arrayItem.value;
e_resultRow.appendChild(e_label);
e_resultRow.appendChild(e_value);
e_resultsTable.appendChild(e_resultRow);
});
return e_resultsTable;
}
function show_speedtest() {
show_element("SpeedtestOverlay");
var speedtestInfoContainer = document.getElementById("SpeedtestInfoContainer");
speedtestInfoContainer.classList.add("showLoadingIcon");
show_element("SpeedtestProgress");
hide_element("SpeedtestResults");
socket.emit('speedtest');
}
function hide_speedtest(){
hide_element("SpeedtestOverlay");
}
function enable_status_updates() {
clearInterval(statusInterval);
statusInterval = setInterval(getStatus,1000);
show_element("VPNStatusSection");
}
function disable_status_updates() {
clearInterval(statusInterval);
hide_element("VPNStatusSection");
}
function hide_traceroute(){
hide_element("TracerouteOverlay");
}
function show_shutdown(){
show_element("ShutdownOverlay");
}
function hide_shutdown(){
hide_element("ShutdownOverlay");
}
function shutdown() {
hide_element("ShutdownButtonTable");
document.getElementById("ShutdownInfoContainer").innerHTML = "Shutting down. Unplug after 60 seconds.
";
socket.emit('shutdown');
}
function show_enable_vpn(){
show_element("EnableVPNOverlay");
}
function hide_enable_vpn(){
hide_element("EnableVPNOverlay");
}
function show_disable_vpn(){
show_element("DisableVPNOverlay");
}
function hide_disable_vpn(){
hide_element("DisableVPNOverlay");
}
function show_reboot(){
show_element("RebootOverlay");
}
function hide_reboot(){
hide_element("RebootOverlay");
}
function reboot() {
hide_element("RebootButtonTable");
socket.emit('reboot');
var counter=90;
var id;
id = setInterval(function() {
counter--;
if(counter < 0) {
clearInterval(id);
hide_element("RebootOverlay");
show_basic();
}
else {
document.getElementById("RebootInfoContainer").innerHTML = "
Rebooting. Page will reload in " + counter.toString() + " seconds.
";
}
}, 1000);
}
function enable_vpn() {
hide_element("EnableVPNOverlay");
show_changing_vpn_message();
set_current_vpn_server_changing('enabling vpn...');
socket.emit('enablevpn');
sleep(2000).then(() => {
show_vpn_change_message();
})
//updateVPNChangeTime();
//enable_status_updates();
clearStatus();
show_basic();
}
function disable_vpn() {
//disable_status_updates();
clearStatus();
hide_element("DisableVPNOverlay");
show_changing_vpn_message();
set_current_vpn_server_changing('disabling vpn...');
socket.emit('disablevpn');
sleep(2000).then(() => {
show_basic();
get_current_vpn_server();
})
sleep(2000).then(() => {
show_vpn_change_message();
})
//updateVPNChangeTime();
}
function server_click(s,p) {
// callback function used for 'click' events
return function() {
change_vpn_server(s,p);
}
}
function populateBasicServers(serverlist_json) {
var ChooseVPNBasic = document.getElementById("ChooseVPNBasic");
delete_all_children(ChooseVPNBasic);
var servers = serverlist_json;
var numservers = servers.length;
var numcolumns = 3;
var numrows = Math.ceil(numservers/numcolumns);
var currentserver = 0;
var serverTable = document.createElement("div");
serverTable.setAttribute("id","basicServersTable");
for (row = 1; row <= numrows; row++){
var tr = document.createElement("div");
if (row < numrows)
tr.setAttribute("class","basicServersTableRow");
else
tr.setAttribute("class","basicServersTableLastRow");
for (column = 1; column <= numcolumns; column++) {
var cell = document.createElement("div");
cell.setAttribute('class','basicServersTableCell');
if (currentserver < numservers) {
var server = servers[currentserver];
var servername = server["servername"];
var serverport = server["serverport"];
var countryname = server["countryname"];
var regionname = server["regionname"];
if (regionname == null)
regionname = "";
var flag = document.createElement("INPUT");
flag.setAttribute("class","basicServersFlag");
flag.setAttribute("type","image");
flag.setAttribute("src","images/flags/" + server["flagfile"]);
flag.setAttribute("height","60%");
flag.addEventListener("click", server_click(servername, serverport), false);
var country_info = document.createElement('div');
country_info.innerHTML = countryname + " " + regionname;
cell.appendChild(flag);
cell.appendChild(country_info);
currentserver++;
}
tr.appendChild(cell);
serverTable.appendChild(tr);
}
}
//serverTable.appendChild(tbody);
ChooseVPNBasic.appendChild(serverTable);
}
function get_basic_vpn_servers() {
socket.emit('getserverlist', {'servergroup':'basic'});
}
function compare_servers(a,b) {
if (a['countryname'] < b['countryname'])
return -1;
if (a['countryname'] > b['countryname'])
return 1;
return 0;
}
function populateAdvancedServers(serverlist_json) {
var ChooseVPNAdvanced = document.getElementById("ChooseVPNAdvanced");
delete_all_children(ChooseVPNAdvanced);
var servers = serverlist_json;
servers.sort(compare_servers);
var numservers = servers.length;
var currentserver = 0;
lastCountry="";
for (row = 1; row < numservers; row++){
var server = servers[currentserver];
//console.log(server);
var country = server["countryname"];
var region = server["regionname"];
if (region == null)
region = "";
if (country != lastCountry) {
lastCountry = country;
var heading = document.createElement("h3");
heading.innerHTML = country;
ChooseVPNAdvanced.appendChild(heading);
}
var url = document.createElement("a");
url.setAttribute("class","serverUrl");
url.setAttribute("href","javascript:void(0);");
url.addEventListener("click", server_click(server["servername"], server["serverport"]), false);
url.innerHTML = server["servername"];
ChooseVPNAdvanced.appendChild(url);
if (region != "") {
var r = document.createTextNode(" (" + region + ")");
ChooseVPNAdvanced.appendChild(r);
}
linebreak = document.createElement("br");
ChooseVPNAdvanced.appendChild(linebreak);
currentserver++;
}
}
function get_advanced_vpn_servers() {
socket.emit('getserverlist', {'servergroup':'advanced'});
}
function populateSyslog(data) {
syslogData = data;
var syslogInfoContainer = document.getElementById("SyslogInfoContainer");
var e = document.createElement('pre');
e.setAttribute('id','syslogData');
e.innerText = syslogData;
syslogInfoContainer.classList.remove("showLoadingIcon");
syslogInfoContainer.appendChild(e);
}
function show_syslog() {
var syslogInfoContainer = document.getElementById("SyslogInfoContainer");
delete_all_children(syslogInfoContainer);
syslogInfoContainer.classList.add("showLoadingIcon");
show_element("SyslogOverlay");
socket.emit('getsyslog');
}
function hide_syslog() {
hide_element("SyslogOverlay");
}
function show_basic() {
get_current_vpn_server();
get_basic_vpn_servers();
show_element(["VPNSection","ChooseVPNBasic"]);
hide_element(["Admin","Tools","ChooseVPNAdvanced"]);
}
function show_advanced() {
get_advanced_vpn_servers();
show_element(["VPNSection","ChooseVPNAdvanced"]);
hide_element(["Admin","Tools","ChooseVPNBasic"]);
}
function updateVPNChangeTime() {
var vpnStatusHeading = document.getElementById("VPNStatusHeading");
vpnStatusHeading.innerText = "VPN status: changing vpn...";
var e = document.getElementById("VPNStatusSection");
var att = document.createAttribute("vpnchangetime");
att.value = Date.now();
e.setAttributeNode(att);
}
function page_load() {
setIcon('internetStatusIcon','loadingIcon');
setIcon('dnsStatusIcon','loadingIcon');
setIcon('openvpnServiceStatusIcon','loadingIcon');
setIcon('openvpnServiceStateIcon','loadingIcon');
get_basic_vpn_servers();
get_current_vpn_server();
}
================================================
FILE: www/styles/index.css
================================================
#CurrentVPNFlagImage {
height: 60px;
}
#basicServersTable {
display: flex;
flex-direction: column;
/* flex-grow: 100;
*/
box-sizing: border-box;
/*border-style: solid;
border-width: thin;
*/
}
.basicServersTableRow {
display: flex;
flex-direction: row;
flex-grow: 100;
justify-content: space-between;
box-sizing: border-box;
/*border-style: solid;
border-width: thin;
*/
margin-left:50px;
margin-right:50px;
margin-bottom: 10px;
}
.basicServersTableLastRow {
display: flex;
flex-direction: row;
flex-grow: 100;
justify-content: space-between;
box-sizing: border-box;
/*border-style: solid;
border-width: thin;
*/
margin-left:50px;
margin-right:50px;
}
.basicServersTableCell {
box-sizing: border-box;
width: 150px;
/*border-style: solid;
border-width: thin;
*/
text-align:center;
font-family:Arial;
font-size:18px;
}
.basicServersFlag {
height:60px;
}
html {
height:100%;
min-width:500px;
}
body {
margin:0;
padding:0;
height:100%;
min-width:500px;
}
.sectionHeading {
font-family:Arial;
font-weight:bold;
font-size: 22px;
padding-top: 10px;
padding-left: 10px;
padding-bottom: 20px;
}
.sectionSpacer {
height: 5px;
}
#spacerDiv{
float:left;
width:5px;
}
#GatewayStatusSection {
min-width: 600px;
box-sizing: border-box;
background-color: #E6E6E6;
padding-bottom:10px;
margin-top: 5px;
}
#GatewayStatusOverlay {
height:100px;
margin-left:10px;
margin-right:10px;
z-index:999;
background-image: url('/images/status_icons/loading.gif');
background-repeat: no-repeat;
background-position: center;
background-color: #E6E6E6;
border-radius: 10px;
opacity:1;
}
#GatewayStatusSection H2{
/* padding-top:10px;
padding-left: 10px;
*/
/* border-width: thin;
border-color: black;
border-style: solid;
*/
}
.StatusTable {
height:100px;
/* border-width: thin;
border-color: black;
border-style: solid;
*/
background-color: #E6E6E6;
margin-top:-100px;
z-index:1;
opacity:0;
}
@keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.blink {
animation: blink 1s;
animation-iteration-count: infinite;
}
.warnIcon{
height: 20px;
background: url('/images/status_icons/warn20.png');
background-repeat:no-repeat;
/* animation: blink 1s;
animation-iteration-count:infinite;
*/
text-indent: -9999px;
}
.okIcon{
height: 20px;
background: url('/images/status_icons/ok20.png');
background-repeat:no-repeat;
text-indent: -9999px;
}
.disabledIcon{
height: 20px;
background: url('/images/status_icons/disabled20.png');
background-repeat:no-repeat;
text-indent: -9999px;
}
.loadingIcon{
height: 20px;
background: url('/images/status_icons/loading20.gif');
background-repeat:no-repeat;
text-indent: -9999px;
}
.clearDiv{
clear:both;
}
.statusCol1{
float:left;
/* border-style:solid;
border-width:thin;
*/
width:24px;
}
.statusCol2{
float:left;
/* border-style:solid;
border-width:thin;
*/
width:120px;
font-family:"Arial";
font-size:18px;
margin-left:5px;
}
.statusCol3{
float:left;
/* border-style:solid;
border-width:thin;
*/
width:130px;
text-align:right;
font-family:"Arial";
font-size:18px;
}
.statusCol4{
float:left;
/* border-style:solid;
border-width:thin;
*/
width:130px;
font-family:"Arial";
font-size:18px;
margin-left:40px;
}
.statusCol5{
float:left;
/* border-style:solid;
border-width:thin;
*/
width:40px;
text-align:right;
font-family:"Arial";
font-size:18px;
}
.statusCol6{
float:left;
/* border-style:solid;
border-width:thin;
*/
width:20px;
font-family:"Arial";
font-size:18px;
display:none;
}
.StatusTableRow{
height:25px;
max-height:25px;
padding-left:0px;
/* border-style:solid;
border-width:thin;
*/
margin-left:80px;
}
.header{
background-color: #E6E6E6;
min-width:600px;
height: 50px;
color:black;
text-align:center;
vertical-align: middle;
z-index: 1;
}
.screenoverlay {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: rgba(0,0,0,0.6);
z-index: 10;
opacity: 1;
transition: opacity 2s linear;
display:none;
}
.opaqueoverlay {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
background-color: white;
opacity: 1;
display:none;
}
.serverUrl {
margin-left: 1em;
}
#tracerouteData {
line-height: normal;
}
#syslogData {
line-height: normal;
}
#AJAXMessage {
width: 400px;
height: 150px;
line-height: 20px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -200px;
background-color: #FFFFFF;
border-radius: 5px;
text-align: center;
z-index: 11; /* 1px higher than the overlay layer */
}
#VPNChangeMessage {
width: 400px;
height: 150px;
line-height: 20px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -200px;
background-color: #FFFFFF;
border-radius: 5px;
text-align: center;
z-index: 11; /* 1px higher than the overlay layer */
}
#ChangingVPNMessage {
width: 400px;
height: 150px;
line-height: 20px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -200px;
background-color: #FFFFFF;
border-radius: 5px;
text-align: center;
z-index: 11; /* 1px higher than the overlay layer */
}
#IPInfoBox {
width: 440px;
height: 335px;
line-height: 20px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -150px;
margin-left: -220px;
background-color: #FFFFFF;
border-radius: 5px;
line-height: 50%;
text-align: left;
z-index: 11; /* 1px higher than the overlay layer */
}
#IPInfoBoxTitle{
text-align:center;
}
#ButtonContainer {
text-align: center;
position: absolute;
bottom: 0;
left: 0;
height: 40px;
width: 100%;
}
#IPInfoBoxTableContainer {
width: 90%;
text-align: left;
height: 200px;
margin-left: 5%;
margin-top:50px;
}
#IPLocationTable {
table-layout: fixed;
width: 100%;
border-collapse: collapse;
}
#IPLocationTable tr {
}
#IPLocationTable td{
padding-left: 10px;
font-family:"Arial";
width: 50%;
padding-top: 10px;
padding-bottom: 10px;
}
#IPLocationTable tr:nth-child(even) {
background: #E6E6E6
}
#IPLocationTable tr:nth-child(odd) {
background: #FFF
}
#ButtonSpacer {
height: 20px;
}
.ButtonSpacer{
height: 20px;
}
.showLoadingIcon {
background-image: url('/images/status_icons/loading.gif');
background-repeat: no-repeat;
background-position: center;
}
#TracerouteInfoBox {
width: 800px;
height: 400px;
line-height: 20px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #FFFFFF;
border-radius: 5px;
line-height: 50%;
text-align: left;
z-index: 11; /* 1px higher than the overlay layer */
}
#SpeedtestInfoBox {
width: 600px;
height: 400px;
line-height: 20px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #FFFFFF;
border-radius: 5px;
line-height: 50%;
text-align: left;
z-index: 11; /* 1px higher than the overlay layer */
}
#SpeedtestStatusMessage{
padding-top: 10px;
padding-bottom: 10px;
font-family: "Arial";
font-size: 16px;
font-weight: bold;
}
#SpeedtestProgress{
padding-left: 10px;
font-family: "Arial";
}
.speedtestLabelColumn {
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
font-family:"Arial";
float: left;
width: 150px;
}
.speedtestValueColumn {
padding-top: 5px;
padding-bottom: 5px;
font-family:"Arial";
float: left;
}
.speedtestResultRow:nth-child(even) {
background: #FFF;
}
.speedtestResultRow:nth-child(odd) {
background: #E6E6E6;
}
.speedtestResultRow:after {
content: "";
display: table;
clear: both;
}
#SyslogInfoBox {
width: 90%;
height: 90%;
line-height: normal;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #FFFFFF;
border-radius: 5px;
line-height: 50%;
text-align: left;
z-index: 11; /* 1px higher than the overlay layer */
}
#TracerouteInfoBoxTitle{
text-align:center;
}
#SpeedtestInfoBoxTitle{
text-align:center;
}
#SyslogInfoBoxTitle{
text-align:center;
}
#TracerouteInfoContainer {
width: 90%;
text-align: left;
height: 300px;
margin-left: 5%;
overflow:auto;
}
#SpeedtestInfoContainer {
width: 90%;
text-align: left;
height: 300px;
margin-left: 5%;
overflow:auto;
}
#SyslogInfoContainer {
width: 90%;
text-align: left;
height: 85%;
margin-left: 5%;
margin-bottom:0;
overflow:auto;
}
#SpeedtestInfoBox {
font-family:"Courier";
line-height:100%;
}
#SyslogText{
font-family:"Courier";
line-height:100%;
}
#TracerouteText{
font-family:"Courier";
line-height:100%;
}
#ShutdownInfoBox {
width: 400px;
height: 250px;
line-height: 50px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -125px;
margin-left: -200px;
background-color: #FFFFFF;
border-radius: 5px;
line-height: 50%;
text-align: left;
z-index: 11; /* 1px higher than the overlay layer */
}
#ShutdownInfoBoxTitle{
text-align:center;
}
#ShutdownInfoContainer {
width: 90%;
line-height:150%;
text-align: left;
height: 125px;
margin-left: 5%;
overflow:auto;
}
#ShutdownButtonTable {
width: 100%;
table-layout: fixed;
text-align: center;
margin-bottom: 20px;
}
#RebootInfoBox {
width: 400px;
height: 250px;
line-height: 50px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -125px;
margin-left: -200px;
background-color: #FFFFFF;
border-radius: 5px;
line-height: 50%;
text-align: left;
z-index: 11; /* 1px higher than the overlay layer */
}
#RebootInfoBoxTitle{
text-align:center;
}
#RebootInfoContainer {
width: 90%;
line-height:150%;
text-align: left;
height: 125px;
margin-left: 5%;
overflow:auto;
}
#RebootButtonTable {
width: 100%;
table-layout: fixed;
text-align: center;
margin-bottom: 20px;
}
#DisableVPNInfoBox {
width: 400px;
height: 250px;
line-height: 50px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -125px;
margin-left: -200px;
background-color: #FFFFFF;
border-radius: 5px;
line-height: 50%;
text-align: left;
z-index: 11; /* 1px higher than the overlay layer */
}
#DisableVPNInfoBoxTitle{
text-align:center;
}
#DisableVPNInfoContainer {
width: 90%;
line-height:150%;
text-align: left;
height: 125px;
margin-left: 5%;
overflow:auto;
}
#DisableVPNButtonTable {
width: 100%;
table-layout: fixed;
text-align: center;
margin-bottom: 20px;
}
#EnableVPNInfoBox {
width: 400px;
height: 250px;
line-height: 50px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -125px;
margin-left: -200px;
background-color: #FFFFFF;
border-radius: 5px;
line-height: 50%;
text-align: left;
z-index: 11; /* 1px higher than the overlay layer */
}
#EnableVPNInfoBoxTitle{
text-align:center;
}
#EnableVPNInfoContainer {
width: 90%;
line-height:150%;
text-align: left;
height: 125px;
margin-left: 5%;
overflow:auto;
}
#EnableVPNButtonTable {
width: 100%;
table-layout: fixed;
text-align: center;
margin-bottom: 20px;
}
#MainContainer{
display: flex;
flex-direction: row;
box-sizing: border-box;
/*border-style:solid;
border-width:thin;
*/
height:calc(100% - 110px);
width: 100%;
/*height:auto;
*/
overflow:hidden;
margin-top:5px;
}
#PageContainer{
display: flex;
flex-direction: column;
flex-grow: 100;
overflow: auto;
box-sizing: border-box;
/*border-style:solid;
border-width:thin;
*/
margin-left: 5px;
}
#NavigationMenu{
box-sizing: border-box;
/*border-style:solid;
border-width:thin;
*/
flex-grow:100;
min-width:110px;
max-width:110px;
background-color: #E6E6E6;
}
#VPNSection {
display: flex;
flex-direction:column;
flex-grow:100;
box-sizing: border-box;
/* border-style:solid;
border-width:thin;
*/
}
.menubuttonspacer {
height:20px;
}
.menubutton {
width: 100%;
vertical-align: middle;
padding-left: 10px;
font-family: "Arial";
background-color: #CCCCCC;
}
.buttonmenu ul {
margin: 0;
padding: 0;
width:100%;
float:left;
height: 100%;
list-style-type: none;
}
.buttonmenu ul li a {
text-decoration: none;
color: white;
padding: 10.5px 11px;
margin-left: 5px;
margin-right: 5px;
margin-top: 5px;
background-color: #4C4C4C;
font-family:"Arial";
display:block;
}
.buttonmenu ul li a:visited {
color: white;
}
.buttonmenu ul li a:hover, #NavigationMenu ul li .current {
color: white;
border-style:solid;
border-color:white;
border-width:2px;
}
h1 {
position:relative;
padding-top:5px;
padding-left:5px;
margin-top: 0px;
vertical-align: middle;
font-family: "Arial";
z-index:2;
}
h2 {
font-family: "Arial";
}
p {
font-family: "Arial";
font-size: 20px;
}
h3 {
font-family: "Arial";
}
#CurrentVPNSection {
box-sizing: border-box;
/*border-style: solid;
border-width: thin;
*/
background-color: #E6E6E6;
}
#CurrentVPNSection h3 {
/*padding-left: 50px;
*/
}
#CurrentVPNFlag table{
width: 100%;
table-layout: fixed;
text-align: center;
}
#CurrentVPNFlag td{
border-style: none;
vertical-align:top;
margin-top: 0;
margin-bottom: 0;
padding: 0;
}
#CurrentVPNFlag p{
margin-top: 0;
margin-bottom: 10;
}
#CurrentVPNFlag a{
margin-top: 0;
margin-bottom: 0;
}
#CurrentVPNSection H2{
/*padding-top:10px;
padding-left: 10px;
margin-top:0;
*/
}
#VPNDisabledWarningIcon{
content:url(/images/status_icons/Warning-icon-hi.png);
height: 10px;
}
#NewVPNSection H2{
/*
padding-left:10px;
padding-top:10px;
margin-top:0;
border-style: solid;
border-width: 1px;
border-color: red;
*/
}
#VPNChooser {
display: flex;
flex-direction: column;
flex-grow:100;
margin-top: 5px;
box-sizing: border-box;
/* border-style: solid;
border-width: thin;
*/
padding-bottom:5px;
background-color: #E6E6E6;
}
#VPNChooser h2 {
/*padding-left:10px;
padding-top:10px;
*/
}
#VPNChooser h3 {
padding-left: 5px;
}
#
.ChoicesTable{
width: 100%;
table-layout: fixed;
text-align: center;
}
.ChoicesTable td{
vertical-align:top;
margin-top: 0;
margin-bottom: 0;
border-width: 0;
height: 100px;
padding: 0;
}
.ChoicesTable p{
margin-top: 0;
margin-bottom: 10;
}
.ChoicesTable a{
margin-top: 0;
margin-bottom: 0;
}
#ChooseVPNAdvanced{
padding-left: 10px;
display:none;
font-family: Arial;
font-size: 12px;
}
#ChooseVPNAdvanced p{
padding-left: 70px;
}
#Tools{
display:none;
height:100vh;
background-color: #E6E6E6;
}
#Tools h2{
padding-left:10px;
padding-top:10px;
margin-top:0;
}
#ToolsMenu{
height: 100%;
width:98%;
margin-left:1%;
padding-top:10px;
}
#AdminMenu{
height: 100%;
width:98%;
margin-left:1%;
padding-top:10px;
}
#Admin{
display:none;
height:100vh;
background-color: #E6E6E6;
}
#Admin h2{
padding-left:10px;
padding-top:10px;
margin-top:0;
}
footer{
margin-top: 5px;
position:relative;
height:50px;
background-color: #E6E6E6;
color:black;
text-align:center;
vertical-align: middle;
padding:0px;
z-index: 1;
}
#OpenVPNLogo {
position:relative;
float: right;
width: 181px;
height: 47px;
z-index: 99;
}