1 // List of available ciphers
4 vpnciphers = vpnciphers.concat(['AES-128-CBC','AES-128-CFB','AES-128-OFB','AES-192-CBC','AES-192-CFB','AES-192-OFB','AES-256-CBC','AES-256-CFB','AES-256-OFB']);
6 vpnciphers = vpnciphers.concat(['BF-CBC','BF-CFB','BF-OFB','CAST5-CBC','CAST5-CFB','CAST5-OFB','DES-CBC','DES-CFB','DES-EDE3-CBC','DES-EDE3-CFB','DES-EDE3-OFB','DES-EDE-CBC','DES-EDE-CFB','DES-EDE-OFB','DES-OFB','DESX-CBC','IDEA-CBC','IDEA-CFB','IDEA-OFB','RC2-40-CBC','RC2-64-CBC','RC2-CBC','RC2-CFB','RC2-OFB','RC5-CBC','RC5-CFB','RC5-OFB']);
8 var helpURL = new Array();
9 helpURL['howto'] = 'http://openvpn.net/index.php/open-source/documentation/howto.html';
10 helpURL['staticKeys'] = 'http://openvpn.net/index.php/open-source/documentation/miscellaneous/78-static-key-mini-howto.html';
11 helpURL['TLSKeys'] = 'http://openvpn.net/index.php/open-source/documentation/howto.html#pki';
13 // Handles parsing status files and displaying the information
14 function StatusUpdater(clients, routes, stats, time, cDiv, ncDiv, eDiv)
16 this.init(clients, routes, stats, time, cDiv, ncDiv, eDiv);
19 StatusUpdater.prototype =
21 init: function(clients, routes, stats, time, cDiv, ncDiv, eDiv)
23 this.clientTable = clients? new TomatoGrid(clients,'sort',0,null): null;
24 this.routeTable = routes? new TomatoGrid(routes,'sort',0,null): null;
25 this.statTable = stats? new TomatoGrid(stats,'sort',0,null): null;
26 this.statusTime = time? E(time): null;
27 this.content = cDiv? E(cDiv): null;
28 this.noContent = ncDiv? E(ncDiv): null;
29 this.errors = eDiv? E(eDiv): null;
31 update: function(text)
33 if(this.errors) this.errors.innerHTML = '';
34 if(this.noContent) this.noContent.style.display = (text==''?'':'none');
35 if(this.content) this.content.style.display = (text==''?'none':'');
37 if(this.clientTable) this.clientTable.tb.parentNode.style.display = 'none';
38 if(this.clientTable) this.clientTable.removeAllData();
39 if(this.routeTable) this.routeTable.tb.parentNode.style.display = 'none';
40 if(this.routeTable) this.routeTable.removeAllData();
41 if(this.statTable) this.statTable.tb.parentNode.style.display = 'none';
42 if(this.statTable) this.statTable.removeAllData();
44 if(this.statTable) this.statTable.headerSet(['Name','Value']);
46 var lines = text.split('\n');
47 var staticStats = false;
48 for (i = 0; text != '' && i < lines.length; ++i)
52 var fields = lines[i].split(',');
53 if ( fields.length == 0 ) continue;
59 if(this.statusTime) this.statusTime.innerHTML = fields[1];
65 if(this.clientTable) this.clientTable.headerSet(fields.slice(2,fields.length-1));
68 if(this.routeTable) this.routeTable.headerSet(fields.slice(2,fields.length-1));
71 if(this.errors) this.errors.innerHTML += 'Unknown header: '+lines[i]+'<br>';
76 if(this.clientTable) this.clientTable.tb.parentNode.style.display = '';
77 if(this.clientTable) this.clientTable.insertData(-1, fields.slice(1,fields.length-1))
80 if(this.routeTable) this.routeTable.tb.parentNode.style.display = '';
81 if(this.routeTable) this.routeTable.insertData(-1, fields.slice(1,fields.length-1))
84 if(this.statTable) this.statTable.tb.parentNode.style.display = '';
85 if(this.statTable) this.statTable.insertData(-1, fields.slice(1));
87 case "OpenVPN STATISTICS":
92 if(this.statusTime) this.statusTime.innerHTML = fields[1];
100 if(this.statTable) this.statTable.tb.parentNode.style.display = '';
101 if(this.statTable) this.statTable.insertData(-1, fields);
103 else if(this.errors) this.errors.innerHTML += 'Unknown: '+lines[i]+'<br>';